ComenzarEmpieza gratis

Looking at the farmers market data

Loaded is a new dataset, markets. Each row of this DataFrame belongs to an individual farmers market in the continental United States with various information about the market contained in the columns. In this exercise, explore the columns of the data to get familiar with them for future analysis and plotting.

As a first step, print out the first three lines of markets to get an idea of what type of data the columns encode. Then look at the summary descriptions of all of the columns. Since there are so many columns in the DataFrame, you'll want to turn the results 'sideways' by transposing the output to avoid cutting off rows.

Este ejercicio forma parte del curso

Improving Your Data Visualizations in Python

Ver curso

Instrucciones del ejercicio

  • Print the first three rows of the data and transpose by chaining the .transpose() method to the DataFrame.
  • Print the basic description of every column along with its median (which is already specified for you with the percentiles argument) and again chain the .transpose() method.

Ejercicio interactivo práctico

Prueba este ejercicio y completa el código de muestra.

# Print first three rows of data and transpose
first_rows = markets.____(____).____()
print(first_rows)

# Get descriptions of every column
col_descriptions = markets.____(____ = '____',
                                percentiles = [0.5]).____()
print(col_descriptions)
Editar y ejecutar código