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
modin.__version__
import modin.pandas as pd df = pd.DataFrame([["A"]], dtype="category") df.iloc[0, 0] = None
I get an assertion error from an internal Modin assertion instead of setting the only element in the dataframe to numpy.NaN, as pandas would.
numpy.NaN
AssertionError Traceback (most recent call last) Input In [20], in <module> 1 import modin.pandas as pd 3 df = pd.DataFrame([["A"]], dtype="category") ----> 4 df.iloc[0, 0] = None File ~/modin/modin/pandas/indexing.py:945, in _iLocIndexer.__setitem__(self, key, item) 942 self._check_dtypes(col_loc) 944 row_lookup, col_lookup = self._compute_lookup(row_loc, col_loc) --> 945 super(_iLocIndexer, self).__setitem__( 946 row_lookup, 947 col_lookup, 948 item, 949 axis=self._determine_setitem_axis( 950 row_lookup, col_lookup, row_scalar, col_scalar 951 ), 952 ) File ~/modin/modin/pandas/indexing.py:413, in _LocationIndexerBase.__setitem__(self, row_lookup, col_lookup, item, axis) 411 if not assigning_to_single_category_column: 412 item = self._broadcast_item(row_lookup, col_lookup, item, to_shape) --> 413 self._write_items(row_lookup, col_lookup, item) File ~/modin/modin/pandas/indexing.py:493, in _LocationIndexerBase._write_items(self, row_lookup, col_lookup, item) 480 def _write_items(self, row_lookup, col_lookup, item): 481 """ 482 Perform remote write and replace blocks. 483 (...) 491 The new item value that needs to be assigned to `self`. 492 """ --> 493 new_qc = self.qc.write_items(row_lookup, col_lookup, item) 494 self.df._create_or_update_from_compiler(new_qc, inplace=True) File ~/modin/modin/core/storage_formats/pandas/query_compiler.py:3062, in PandasQueryCompiler.write_items(self, row_numeric_index, col_numeric_index, broadcasted_items) 3059 partition.iloc[row_internal_indices, col_internal_indices] = item 3060 return partition -> 3062 new_modin_frame = self._modin_frame.apply_select_indices( 3063 axis=None, 3064 func=iloc_mut, 3065 row_labels=row_numeric_index, 3066 col_labels=col_numeric_index, 3067 new_index=self.index, 3068 new_columns=self.columns, 3069 keep_remaining=True, 3070 item_to_distribute=broadcasted_items, 3071 ) 3072 return self.__constructor__(new_modin_frame) File ~/modin/modin/core/dataframe/pandas/dataframe/dataframe.py:110, in lazy_metadata_decorator.<locals>.decorator.<locals>.run_f_on_minimally_updated_metadata(self, *args, **kwargs) 108 elif apply_axis == "rows": 109 obj._propagate_index_objs(axis=0) --> 110 result = f(self, *args, **kwargs) 111 if apply_axis is None and not transpose: 112 result._deferred_index = self._deferred_index File ~/modin/modin/core/dataframe/pandas/dataframe/dataframe.py:1981, in PandasDataframe.apply_select_indices(self, axis, func, apply_indices, row_labels, col_labels, new_index, new_columns, keep_remaining, item_to_distribute) 1979 assert row_labels is not None and col_labels is not None 1980 assert keep_remaining -> 1981 assert item_to_distribute is not None 1982 row_partitions_list = self._get_dict_of_block_index(0, row_labels).items() 1983 col_partitions_list = self._get_dict_of_block_index(1, col_labels).items() AssertionError:
The text was updated successfully, but these errors were encountered:
FIX-#3981, FIX-#3801, FIX-#4149: Stop broadcasting scalars to set ite…
c17dde7
…ms. (#4160) Signed-off-by: mvashishtha <mahesh@ponder.io>
515d3e3
Successfully merging a pull request may close this issue.
System information
modin.__version__
): 0.13.0+11.g62179ef6Describe the problem
I get an assertion error from an internal Modin assertion instead of setting the only element in the dataframe to
numpy.NaN
, as pandas would.Source code / logs
Show stack trace
The text was updated successfully, but these errors were encountered: