You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Print dataframe in a table:**`print(tabulate(print_table, headers=headers))` where "print_table" is a list of lists and "headers" is a list of the string headers
52
+
-**Read in a CSV dataset:**`pd.DataFrame.from_csv("csv_file")` OR `pd.read_csv("csv_file")`
53
+
-**Read in an Excel dataset:**`pd.read_excel("excel_file")`
-**Print dataframe in a table:**`print(tabulate(print_table, headers=headers))` where "print_table" is a list of lists and "headers" is a list of the string headers
57
57
58
58
#### Basic Data Handling
59
-
**Drop missing data:**`df.dropna(axis=0, how='any')` Return object with labels on given axis omitted where alternately any or all of the data are missing
60
-
**Replace missing data:**`df.replace(to_replace=None, value=None)` Replace values given in "to_replace" with "value".
61
-
**Check for NANs:**`pd.isnull(object)` Detect missing values (NaN in numeric arrays, None/NaN in object arrays)
62
-
**Drop a feature:**`df.drop('feature_variable_name', axis=1)` axis is either 0 for rows, 1 for columns
63
-
**Convert object type to float:**`pd.to_numeric(df["feature_name"], errors='coerce')` Convert object types to numeric to be able to perform compuations
64
-
**Convert DF to numpy array:**`df.as_matrix()`
65
-
**Get first "n" rows:**`df.head([n])`
66
-
**Get data by feature name:**`df.loc[feature_name]`
59
+
-**Drop missing data:**`df.dropna(axis=0, how='any')` Return object with labels on given axis omitted where alternately any or all of the data are missing
60
+
-**Replace missing data:**`df.replace(to_replace=None, value=None)` Replace values given in "to_replace" with "value".
61
+
-**Check for NANs:**`pd.isnull(object)` Detect missing values (NaN in numeric arrays, None/NaN in object arrays)
62
+
-**Drop a feature:**`df.drop('feature_variable_name', axis=1)` axis is either 0 for rows, 1 for columns
63
+
-**Convert object type to float:**`pd.to_numeric(df["feature_name"], errors='coerce')` Convert object types to numeric to be able to perform compuations
64
+
-**Convert DF to numpy array:**`df.as_matrix()`
65
+
-**Get first "n" rows:**`df.head([n])`
66
+
-**Get data by feature name:**`df.loc[feature_name]`
0 commit comments