# Datasets
# kortical.datasets
This small library is used to access the following list of example datasets within the package:
bbccustomer_reviewsenronenron_multi_labelhouse_price_regressionirismarginstock_pricestitanic
# datasets.load
This function will return an example dataset from the package, in dataframe format.
Inputs
name- A keyword, used to access example datasets (see above).
Returns
df- A dataframe.
from kortical import datasets
titanic_df = datasets.load('titanic')
house_price_regression_df = datasets.load('house_price_regression')
# etc...
# datasets.write_to_disk
This function will copy a dataset (.csv file) to your current working directory, unless a full valid path is provided.
Inputs
name- A keyword used to access example datasets (see above).path(= None) - If given a full valid path, the file will be copied here; otherwise, the file will appear in your current working directory.
Returns
None
import pandas as pd
from kortical import datasets
datasets.write_to_disk('titanic')
titanic_df = pd.read_csv('titanic.csv')
# Or...
datasets.write_to_disk('titanic', path='path/to/my_file.csv')
titanic_df = pd.read_csv('path/to/my_file.csv')