#33 Pandas: Categorical data - 1 in Python.- 19 | Tutorial
Автор: learndataa
Загружено: 2020-05-18
Просмотров: 2211
The video discusses methods to create categoricald data in Python.
Timeline & Data
(Python 3.7)
00:00 - Welcome
00:08 - Outline of video
00:45 - What are categorical variables?: Example
01:32 - What are categorical variables?: Ordered categories
02:05 - What are categorical variables?: Unordered categories
02:47 - What are coded categorical variables?
03:28 - Descriptive statistic of categorical data: .describe()
04:42 - Open Jupyter notebook
04:52 - Data
05:26 - Create categorical data: Series: dtype=‘category’
06:58 - Create categorical data: DataFrame: .astype([‘category’])
08:20 - Create categorical data: Binning: pd.cut()
13:07 - Create categorical data: pd.Categorical()
15:16 - Create categorical DataFrame: during creating it
17:00 - Create categorical DataFrame: use existing
18:18 - Create categorical data: using an Instance: for Series
21:01 - Create categorical data: using an Instance: for a DataFrame
23:28 - Create categorical data: using coded category
25:51 - Create original data from categorical data: Series
27:17 - Equality between categorical data: .CategoricalDType()
28:47 - Descriptive statistics: .describe()
30:08 - Ending notes
################
Data
################
a = pd.Series(['m','n','o','p','m','n'])
a
dfr = pd.DataFrame({
'GeoID':[910291,933822,964834,936384,968484,918242,924353],
'Rainfall_mmph': [7.4,1.3,3.9,5.2,0.1,79,24]
})
dfr
dfc = pd.DataFrame({
'CustomerID':[10000012,10000014,10000044,10000013,10000023,10000067],
'VisitsPerWeek':[6,36,12,1,27,10],
'CustomerSatisfaction':['Poor','Excellent','Average','Bad','Good','Poor'],
'code':[1,4,2,0,3,1]
})
dfc
################
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: