Arturus / kaggle-web-traffic

1st place solution
MIT License
1.82k stars 667 forks source link

Did someone make an error when running lag_indexes method in make_features file #39

Open timtian12 opened 3 years ago

timtian12 commented 3 years ago

KeyError: "Passing list-likes to .loc or [] with any missing labels is no longer supported. The following labels were missing: DatetimeIndex(['2015-04-01', '2015-04-02', '2015-04-03', '2015-04-04',\n '2015-04-05',\n ...\n '2015-06-26', '2015-06-27', '2015-06-28', '2015-06-29',\n '2015-06-30'],\n dtype='datetime64[ns]', length=92, freq=None). See https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#deprecate-loc-reindex-listlike"

1980695671 commented 3 years ago

把.loc[]改成reindex()

Tovi-A commented 3 years ago

把.loc[]改成reindex()

别乱回答

EnriqueGautoSand commented 1 year ago

Done, works just iloc[dates] to reindex(dates)