In [16]:
#import pandas as pd
#ecom = pd.read_csv('Ecommerce.csv')
import pandas as pd
ecom=pd.read_csv("Ecommerce.csv")
In [19]:
ecom.head(2)
Out[19]:
In [25]:
#ecom.info()
#len(ecom.columns)
len(ecom.index)
Out[25]:
What is the average Purchase Price?
ecom['Purchase Price'].mean()¶
What were the highest and lowest purchase prices?
In [26]:
ecom.columns
Out[26]:
In [28]:
ecom["Purchase Price"].mean()
Out[28]:
In [29]:
ecom["Purchase Price"].min()
Out[29]:
In [30]:
ecom["Purchase Price"].max()
Out[30]:
In [45]:
#ecom.head(6)
#ecom[ecom["Language"]=='en']
#ecom[ecom["Language"]=='en'].head(4)
#sum(ecom["Language"]=='en')
ecom[ecom["Language"]=='en']["Language"].count()
Out[45]:
In [47]:
#ecom.head(6)
In [49]:
sum(ecom['Job']=='Lawyer')
Out[49]:
In [57]:
#ecom[ecom['Job']=='Lawyer'].info()
ecom[ecom['Job']=='Lawyer'].count()
Out[57]:
In [52]:
len(ecom[ecom['Job']=='Lawyer'].info())
No comments:
Post a Comment