Skip to content

Commit ec9f3ba

Browse files
authored
Use DataFrame.map instead of DataFrame.applymap (#1613)
- Use `DataFrame.map` instead of `DataFrame.applymap` - `DataFrame.applymap` has been deprecated.
1 parent ad84aa7 commit ec9f3ba

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
### Enhancements
1212
- Support multiple labels for kaggle format
1313
(<https://github.com/openvinotoolkit/datumaro/pull/1607>)
14+
- Use DataFrame.map instead of DataFrame.applymap
15+
(<https://github.com/openvinotoolkit/datumaro/pull/1613>)
1416

1517
### Bug fixes
1618
- Fix StreamDataset merging when importing in eager mode

src/datumaro/plugins/transforms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1957,7 +1957,7 @@ def refine_tabular_media(self, item):
19571957
or item.media.table.dtype(col) is int
19581958
]
19591959

1960-
df[str_cols] = df[str_cols].applymap(lambda x: self.remove_unnecessary_char(x))
1960+
df[str_cols] = df[str_cols].map(lambda x: self.remove_unnecessary_char(x))
19611961

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

0 commit comments

Comments
 (0)