We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
.dtypes
df.copy(deep=True)
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest released version of Modin.
I have confirmed this bug exists on the main branch of Modin. (In order to do this you can follow this guide.)
import modin.pandas as pd df = pd.DataFrame({"a": [1, 2]}) df_renamed = df.rename(columns={"a": "new_a"}, copy=True, inplace=False) # both `.dtypes` has changed print(df_renamed.dtypes) # new_a: int64 print(df.dtypes) # new_a: int64
The PandasDataframe logic doesn't copy .dtypes as it should:
PandasDataframe
modin/modin/core/dataframe/pandas/dataframe/dataframe.py
Lines 1167 to 1174 in 91d6825
df.dtypes is df.copy().dtypes == False
Replace this line with the error backtrace (if applicable).
Replace this line with the output of pd.show_versions()
The text was updated successfully, but these errors were encountered:
FIX-modin-project#5600: Copy '.dtypes' on 'df.copy(deep=True)'
4a4a81b
Signed-off-by: Dmitry Chigarev <dmitry.chigarev@intel.com>
df.copy()
FIX-#5600: Copy '.dtypes' on 'df.copy()' (#5601)
9e729c6
read_csv
read_fwf
read_table
read_custom_text
ModinDtypes
dchigarev
Successfully merging a pull request may close this issue.
Modin version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest released version of Modin.
I have confirmed this bug exists on the main branch of Modin. (In order to do this you can follow this guide.)
Reproducible Example
Issue Description
The
PandasDataframe
logic doesn't copy.dtypes
as it should:modin/modin/core/dataframe/pandas/dataframe/dataframe.py
Lines 1167 to 1174 in 91d6825
Expected Behavior
df.dtypes is df.copy().dtypes == False
Error Logs
Installed Versions
Replace this line with the output of pd.show_versions()
The text was updated successfully, but these errors were encountered: