Conteúdo do Curso
Pandas First Steps
Pandas First Steps
Exploring the Dataset
In pandas
, there's a handy method named info()
that provides basic information about a dataset.
import pandas as pd # It's a dataframe df = pd.read_csv('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/a43d24b6-df61-4e11-9c90-5b36552b3437/example.csv') info = df.info() print(info)
This method displays the number of rows and columns in the DataFrame, as well as each column's name and data type. For instance, df
contains 20 rows and 5 columns.
To determine the length of the DataFrame, we can use the len()
function, as demonstrated in the example below:
Swipe to show code editor
We have a DataFrame labeled wine_data
.
Your task is to get more detailed information about this dataset, such as the types of data it contains, any missing values (and their count), and the memory usage.
Obrigado pelo seu feedback!
Exploring the Dataset
In pandas
, there's a handy method named info()
that provides basic information about a dataset.
import pandas as pd # It's a dataframe df = pd.read_csv('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/a43d24b6-df61-4e11-9c90-5b36552b3437/example.csv') info = df.info() print(info)
This method displays the number of rows and columns in the DataFrame, as well as each column's name and data type. For instance, df
contains 20 rows and 5 columns.
To determine the length of the DataFrame, we can use the len()
function, as demonstrated in the example below:
Swipe to show code editor
We have a DataFrame labeled wine_data
.
Your task is to get more detailed information about this dataset, such as the types of data it contains, any missing values (and their count), and the memory usage.
Obrigado pelo seu feedback!