Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Support Hashable type column #1016

Open
6 tasks
Zeroto521 opened this issue Feb 11, 2022 · 0 comments
Open
6 tasks

[BUG] Support Hashable type column #1016

Zeroto521 opened this issue Feb 11, 2022 · 0 comments

Comments

@Zeroto521
Copy link
Member

Zeroto521 commented Feb 11, 2022

Brief Description

The type of DataFrame's columns is support Hashable.
But Janitor only handles str type columns.

Related Source Codes List

Minimally Reproducible Code

>>> import pandas as pd
>>> import janitor  # noqa

>>> df = pd.DataFrame({0:[None, None]})
>>> df.columns
Int64Index([0], dtype='int64')

>>> df.fill_empty(0, 0)
Traceback (most recent call last):
  File "C:\Software\miniforge3\envs\work\lib\site-packages\multipledispatch\dispatcher.py", line 269, in __call__
    func = self._cache[types]
KeyError: (<class 'pandas.core.frame.DataFrame'>, <class 'int'>)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Software\miniforge3\envs\work\lib\site-packages\pandas_flavor\register.py", line 29, in __call__
    return method(self._obj, *args, **kwargs)
  File "C:\Software\miniforge3\envs\work\lib\site-packages\janitor\utils.py", line 231, in wrapper
    return func(*args, **kwargs)
  File "C:\Software\miniforge3\envs\work\lib\site-packages\janitor\functions\fill.py", line 199, in fill_empty
    return _fill_empty(df, column_names, value=value)
  File "C:\Software\miniforge3\envs\work\lib\site-packages\multipledispatch\dispatcher.py", line 273, in __call__
    raise NotImplementedError(
NotImplementedError: Could not find signature for _fill_empty: <DataFrame, int>
@samukweku samukweku mentioned this issue Mar 13, 2022
3 tasks
@Zeroto521 Zeroto521 changed the title [BUG] Support int type column [BUG] Support Hasable type column Jun 22, 2022
@Zeroto521 Zeroto521 changed the title [BUG] Support Hasable type column [BUG] Support Hashable type column Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant