Skip to content

Commit

Permalink
Replace applymap with map (#639)
Browse files Browse the repository at this point in the history
* replace applymap with map

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Anderson Banihirwe <13301940+andersy005@users.noreply.github.com>
  • Loading branch information
3 people authored Nov 9, 2023
1 parent 92ad899 commit aaad72e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions ci/environment-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dependencies:
- matplotlib
- myst-nb
- netcdf4!=1.6.1
- pandas>=2.1.0
- pip
- pydantic>=2.0
- python-graphviz
Expand Down
2 changes: 1 addition & 1 deletion ci/environment-upstream-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
- ipython
- matplotlib
- netcdf4>=1.5.5,<1.6.1
- pandas
- pandas>=2.1.0
- pip
- pooch
- pre-commit
Expand Down
1 change: 1 addition & 0 deletions ci/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dependencies:
- ipython
- matplotlib
- netcdf4>=1.5.5,<1.6.1
- pandas>=2.1.0
- pip
- pooch
- pre-commit
Expand Down
6 changes: 1 addition & 5 deletions intake_esm/cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,7 @@ def columns_with_iterables(self) -> set[str]:
if self._df.empty:
return set()
has_iterables = (
self._df.sample(20, replace=True)
.applymap(type)
.isin([list, tuple, set])
.any()
.to_dict()
self._df.sample(20, replace=True).map(type).isin([list, tuple, set]).any().to_dict()
)
return {column for column, check in has_iterables.items() if check}

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ fastprogress>=1.0.0
fsspec>=2022.11.0
intake>=0.6.6
netCDF4>=1.5.5
pandas>=2.1.0
requests>=2.24.0
xarray>=2022.06
zarr>=2.12
Expand Down

0 comments on commit aaad72e

Please sign in to comment.