filmov
tv
#37 Pandas: Categorical data - 5: loc, concat, union, codes in Python - 23 | Tutorial
Показать описание
The video discusses if and when a category could change its data type in Python.
Timeline
(Python 3.7)
00:00 - Welcome
00:10 - Outline of video
00:37 - Open Jupyter notebook
00:43 - Data
01:20 - Access or get multiple categorical data: .iloc() : dtype does not change
02:23 - Access or get multiple categorical data: .loc() : dtype does not change
02:55 - Access or get one categorical data: .loc() : dtype changes
03:39 - Access or get one categorical data: .at() : dtype changes
03:32 - Access or get one categorical data as Series: .loc() : dtype does not change
05:17 - Access or get one categorical data: .iloc() : dtype does not change
06:03 - Compare return values after operation on categorical data
07:30 - Category of date time: create a Series
08:40 - Category of date time: get year : dtype changes
10:04 - Matching categories: Error: Replace existing categories in DataFrame with new categories
11:38 - Matching categories: Add new categories to DataFrame
12:20 - Matching categories: Works!: Replace existing categories in DataFrame with new categories
13:06 - Matching categories: Error: Replace categories with mix of some of the existing and new categories
13:06 - Matching categories: Add all existing and new categories to Categorical
14:40 - Matching categories: Works!: Replace existing categories in DataFrame
16:22 - Concatenate: create two Series
17:00 - Concatenate: two Series: with different categories: dtype changes
18:00 - Concatenate: two Series: with different categories: .astype() to change to category
18:30 - Concatenate: two Series: with same categories: dtype does not change
19:14 - Union categories: import library
19:55 - Union categories: two Series as arrays: with different categories: dtype does not change
20:54 - Union categories: two Series as arrays: with same categories: dtype does not change
21:43 - Union categories: two Series as arrays: sort categories
22:10 - Numeric categories: create two Series: Integer category, Float category
23:07 - Numeric categories: Concatenate: Integer and Float: dtype changes to Float
23:46 - Numeric categories: Concatenate: Integer and Integer: dtype does not change
24:27 - Ordered categories: .as_ordered()
25:22 - Union ordered categories: two Series with same categories and same order: dtype does not change
26:17 - Union ordered categories: two Series with different categories: Error
26:51 - Union ordered categories: two Series with different categories: use ‘ignore_order=True’: dtype does not change
27:12 - Codes: Create two Series
27:50 - Codes: get codes: Same category coded differently in different Series
28:40 - Codes: Union coded categories
29:36 - Ending notes
Timeline
(Python 3.7)
00:00 - Welcome
00:10 - Outline of video
00:37 - Open Jupyter notebook
00:43 - Data
01:20 - Access or get multiple categorical data: .iloc() : dtype does not change
02:23 - Access or get multiple categorical data: .loc() : dtype does not change
02:55 - Access or get one categorical data: .loc() : dtype changes
03:39 - Access or get one categorical data: .at() : dtype changes
03:32 - Access or get one categorical data as Series: .loc() : dtype does not change
05:17 - Access or get one categorical data: .iloc() : dtype does not change
06:03 - Compare return values after operation on categorical data
07:30 - Category of date time: create a Series
08:40 - Category of date time: get year : dtype changes
10:04 - Matching categories: Error: Replace existing categories in DataFrame with new categories
11:38 - Matching categories: Add new categories to DataFrame
12:20 - Matching categories: Works!: Replace existing categories in DataFrame with new categories
13:06 - Matching categories: Error: Replace categories with mix of some of the existing and new categories
13:06 - Matching categories: Add all existing and new categories to Categorical
14:40 - Matching categories: Works!: Replace existing categories in DataFrame
16:22 - Concatenate: create two Series
17:00 - Concatenate: two Series: with different categories: dtype changes
18:00 - Concatenate: two Series: with different categories: .astype() to change to category
18:30 - Concatenate: two Series: with same categories: dtype does not change
19:14 - Union categories: import library
19:55 - Union categories: two Series as arrays: with different categories: dtype does not change
20:54 - Union categories: two Series as arrays: with same categories: dtype does not change
21:43 - Union categories: two Series as arrays: sort categories
22:10 - Numeric categories: create two Series: Integer category, Float category
23:07 - Numeric categories: Concatenate: Integer and Float: dtype changes to Float
23:46 - Numeric categories: Concatenate: Integer and Integer: dtype does not change
24:27 - Ordered categories: .as_ordered()
25:22 - Union ordered categories: two Series with same categories and same order: dtype does not change
26:17 - Union ordered categories: two Series with different categories: Error
26:51 - Union ordered categories: two Series with different categories: use ‘ignore_order=True’: dtype does not change
27:12 - Codes: Create two Series
27:50 - Codes: get codes: Same category coded differently in different Series
28:40 - Codes: Union coded categories
29:36 - Ending notes