Skip to content
Snippets Groups Projects
Commit 009c06e3 authored by tomrink's avatar tomrink
Browse files

snapshot...

parent bfcfa753
No related branches found
No related tags found
No related merge requests found
...@@ -12,8 +12,11 @@ from sklearn.tree import DecisionTreeClassifier ...@@ -12,8 +12,11 @@ from sklearn.tree import DecisionTreeClassifier
import sklearn.tree as tree import sklearn.tree as tree
def get_csv_as_dataframe(csv_file): def get_csv_as_dataframe(csv_file, reduce_frac=None):
icing_df = pd.read_csv(csv_file) icing_df = pd.read_csv(csv_file)
# Random selection of reduce_frac of the rows
if reduce_frac is not None:
icing_df = icing_df.sample(frac=reduce_frac)
print(icing_df.describe()) print(icing_df.describe())
print(icing_df.shape) print(icing_df.shape)
return icing_df return icing_df
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment