8. PreProcessing - FORMATTING - example
por Profesor Magallanes
1. saving FORMATTED
1.1. Python
1.1.1. read like this
1.2. R
1.2.1. read like this
2. You are **assuming** data is clean
2.1. See DATA TYPES
2.1.1. R: **str()**
2.1.2. Python: **.info()**
3. Format numeric data
3.1. R: **as.numeric()**
3.1.1. If NAs created, STOP, Explore and CLEAN
3.1.1.1. from strings...
3.1.1.1.1. to numeric
3.2. Python: **pd.to_numeric()**
3.2.1. always use RAISE
3.2.1.1. If NAs created, STOP, Explore and CLEAN
3.2.1.1.1. from strings...
4. Format categorical data
4.1. Nominal
4.1.1. Python
4.1.1.1. categories using numbers
4.1.2. R
4.1.2.1. categories using numbers
4.2. Ordinal
4.2.1. Python
4.2.1.1. Current LEVELS
4.2.1.1.1. NUMERIC representation
4.2.2. R
4.2.2.1. Current LEVELS
4.2.2.1.1. NUMERIC representation
5. Formattting text
5.1. Python
5.1.1. case:
5.1.1.1. non-ascii:
5.1.1.1.1. the change:
5.2. R
5.2.1. case:
5.2.1.1. non-ascii:
5.2.1.1.1. the change:
6. Format dates
6.1. Python
6.1.1. string
6.1.1.1. converting
6.2. R
6.2.1. string
6.2.1.1. converting