Skip to content

Commit

Permalink
Use DataFrame.map instead of DataFrame.applymap (#1613)
Browse files Browse the repository at this point in the history
- Use `DataFrame.map` instead of `DataFrame.applymap`
- `DataFrame.applymap` has been deprecated.
  • Loading branch information
sooahleex authored Sep 25, 2024
1 parent ad84aa7 commit ec9f3ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Enhancements
- Support multiple labels for kaggle format
(<https://github.com/openvinotoolkit/datumaro/pull/1607>)
- Use DataFrame.map instead of DataFrame.applymap
(<https://github.com/openvinotoolkit/datumaro/pull/1613>)

### Bug fixes
- Fix StreamDataset merging when importing in eager mode
Expand Down
2 changes: 1 addition & 1 deletion src/datumaro/plugins/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -1957,7 +1957,7 @@ def refine_tabular_media(self, item):
or item.media.table.dtype(col) is int
]

df[str_cols] = df[str_cols].applymap(lambda x: self.remove_unnecessary_char(x))
df[str_cols] = df[str_cols].map(lambda x: self.remove_unnecessary_char(x))

if not (self._outlier_value):
self.check_outlier(media.table.data[float_cols + int_cols], float_cols + int_cols)
Expand Down

0 comments on commit ec9f3ba

Please sign in to comment.