Skip to content

Commit

Permalink
Categorical and fillna issues with pandas >=1.2 (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
martins0n authored Oct 13, 2021
1 parent 04ad785 commit 9a9f2c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed
- Set default value of `TSDataset.head` method ([#170](https://github.com/tinkoff-ai/etna-ts/pull/170))
- Categorical and fillna issues with pandas >=1.2 ([#190](https://github.com/tinkoff-ai/etna-ts/pull/190))

## [1.1.3] - 2021-10-08
### Fixed
Expand Down
2 changes: 1 addition & 1 deletion etna/transforms/pytorch_forecasting.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def transform(self, df: pd.DataFrame) -> pd.DataFrame:
ts = TSDataset(df, self.freq)
df_flat = ts.to_pandas(flatten=True)
df_flat = df_flat[df_flat.timestamp >= self.min_timestamp]
df_flat = df_flat.fillna(0)
df_flat["target"] = df_flat["target"].fillna(0)

freq_unit = self._calculate_freq_unit(self.freq)
df_flat["time_idx"] = (df_flat["timestamp"] - self.min_timestamp) / freq_unit
Expand Down

0 comments on commit 9a9f2c3

Please sign in to comment.