Superficial Analysis
Welcome to the third section of the course! Here, you will use the pandas
library to analyze data by answering specific questions.
Let's start with some basic information. We are going to analyze and visualize data on store sales. First, we need to determine how many stores we are working with. We can use the .describe()
method of pandas
to show the main descriptive statistics on numerical columns.
Also, we can use the .unique()
method of pandas
to get only unique values of a certain column.
12345678910# Loading the library import pandas as pd # Reading the data df = pd.read_csv('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/72be5dde-f3e6-4c40-8881-e1d97ae31287/shops_data3.csv') df['Date'] = pd.to_datetime(df['Date'], dayfirst = True) # Inspecting the data print(df.describe()) print(df.Store.unique())
For the following question, feel free to edit the code above if necessary.
Thanks for your feedback!
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 3.45
Superficial Analysis
Swipe to show menu
Welcome to the third section of the course! Here, you will use the pandas
library to analyze data by answering specific questions.
Let's start with some basic information. We are going to analyze and visualize data on store sales. First, we need to determine how many stores we are working with. We can use the .describe()
method of pandas
to show the main descriptive statistics on numerical columns.
Also, we can use the .unique()
method of pandas
to get only unique values of a certain column.
12345678910# Loading the library import pandas as pd # Reading the data df = pd.read_csv('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/72be5dde-f3e6-4c40-8881-e1d97ae31287/shops_data3.csv') df['Date'] = pd.to_datetime(df['Date'], dayfirst = True) # Inspecting the data print(df.describe()) print(df.Store.unique())
For the following question, feel free to edit the code above if necessary.
Thanks for your feedback!