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

Assigning an empty DataFrame column to Categorical dtype does not change the dtype #4307

Open
naren-ponder opened this issue Mar 9, 2022 · 1 comment
Labels
bug 🦗 Something isn't working P3 Very minor bugs, or features we can hopefully add some day.

Comments

@naren-ponder
Copy link
Collaborator

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): MacOS Version 11.6
  • Modin version (modin.__version__): 0.13.2
  • Python version: Python 3.8.11
  • Code we can use to reproduce:
import pandas.api.types as pt
from modin.pandas import Categorical
import modin.pandas as pd
df = pd.DataFrame(columns = ["a", "b", "c"])
df = df.set_index(["a"])
df["b"] = Categorical(df["b"], ordered=True)
print(df["b"])
print(pt.is_categorical_dtype(df["b"]))

Describe the problem

When we assign an empty DataFrame column to a Categorical dtype, the data type does not change to Categorical.

Source code / logs

@naren-ponder naren-ponder self-assigned this Mar 9, 2022
@YarShev
Copy link
Collaborator

YarShev commented Mar 11, 2022

@naren-ponder, I see we have many various problems with Categorical dtype. Could you organize all the related issues we have and link them in an epic?

@naren-ponder naren-ponder removed their assignment Apr 20, 2022
@anmyachev anmyachev added the bug 🦗 Something isn't working label Apr 21, 2022
@vnlitvinov vnlitvinov added the P3 Very minor bugs, or features we can hopefully add some day. label Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🦗 Something isn't working P3 Very minor bugs, or features we can hopefully add some day.
Projects
None yet
Development

No branches or pull requests

4 participants