Created
June 13, 2020 22:41
-
-
Save michelkana/5dae8864f754795d3e09701de7d3590f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# prepare train data | |
df_train_summary = df_train_2.groupby(['date']) \ | |
.agg({'price': np.mean}).reset_index() | |
min_date = df_train_summary.date.min() | |
df_train_summary.date = df_train_summary.date - min_date | |
df_train_summary.date = df_train_summary.date.dt.days | |
df_train_summary.sample(frac=.01) | |
# prepare test data | |
df_test_2 = convert_date(df_test) | |
df_test_summary = df_test_2.groupby(['date']) \ | |
.agg({'price': np.mean}).reset_index() | |
df_test_summary.date = df_test_summary.date - min_date | |
df_test_summary.date = df_test_summary.date.dt.days |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment