modin-project / modin

Modin: Scale your Pandas workflows by changing a single line of code
http://modin.readthedocs.io
Apache License 2.0
9.59k stars 648 forks source link

BUG: AttributeError: 'bool' object has no attribute 'all' #7276

Closed lapnd closed 1 month ago

lapnd commented 1 month ago

Modin version checks

Reproducible Example

crit1 = pd.Series(crit1).astype(dff[col].dtype).iloc[0]

Issue Description

Hi, I got AttributeError: 'bool' object has no attribute 'all' with folliwng code

crit1 = pd.Series(crit1).astype(dff[col].dtype).iloc[0]

Where both crit1 and dff[col].dtype are string type. It seems this check is invalid https://github.com/modin-project/modin/blob/main/modin/core/dataframe/pandas/dataframe/dataframe.py#L1730C13-L1730C54

Expected Behavior

It works OK with original code. It is expected to work with Modin-dask

Error Logs

```python-traceback File "/home/administrator/.local/lib/python3.10/site-packages/modin/core/dataframe/pandas/dataframe/dataframe.py", line 1730, in astype if not (col_dtypes == self_dtypes).all(): AttributeError: 'bool' object has no attribute 'all' ```

Installed Versions

Modin dependencies ------------------ modin : 0.30.0 ray : None dask : 2024.4.2 distributed : 2024.4.2 hdk : None pandas dependencies ------------------- pandas : 2.2.0 numpy : 1.26.4