Skip to content

Commit

Permalink
address reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
galipremsagar committed Feb 16, 2022
1 parent 42515d2 commit 33bad4d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
14 changes: 3 additions & 11 deletions python/cudf/cudf/core/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -832,11 +832,7 @@ def _init_from_dict_like(
col_name, tuple
)
self._insert(
i,
col_name,
data[col_name],
nan_as_null=nan_as_null,
ignore_index=True,
i, col_name, data[col_name], nan_as_null=nan_as_null,
)

if columns is not None:
Expand Down Expand Up @@ -4762,10 +4758,7 @@ def to_arrow(self, preserve_index=True):
gen_names, self.index._data.names
):
data._insert(
data.shape[1],
gen_name,
self.index._data[col_name],
ignore_index=True,
data.shape[1], gen_name, self.index._data[col_name],
)
descr = gen_names[0]
index_descr.append(descr)
Expand Down Expand Up @@ -5758,7 +5751,7 @@ def select_dtypes(self, include=None, exclude=None):
for k, col in self._data.items():
infered_type = cudf_dtype_from_pydata_dtype(col.dtype)
if infered_type in inclusion:
df._insert(len(df._data), k, col, ignore_index=True)
df._insert(len(df._data), k, col)

return df

Expand Down Expand Up @@ -6577,7 +6570,6 @@ def _setitem_with_dataframe(
loc=len(input_df._data),
name=col_1,
value=replace_df[col_2],
ignore_index=True,
)


Expand Down
5 changes: 1 addition & 4 deletions python/cudf/cudf/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -6807,10 +6807,7 @@ def _drop_rows_by_labels(

# 4. Reconstruct original layout, and rename
join_res._insert(
ilevel,
name=join_res._index.name,
value=join_res._index,
ignore_index=True,
ilevel, name=join_res._index.name, value=join_res._index
)

midx = cudf.MultiIndex.from_frame(
Expand Down
1 change: 0 additions & 1 deletion python/cudf/cudf/core/groupby/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ def agg(self, func):
0,
col_name,
result.index.get_level_values(col_name)._values,
ignore_index=True,
)
result.index = cudf.core.index.RangeIndex(len(result))

Expand Down

0 comments on commit 33bad4d

Please sign in to comment.