Koalas: Implement DataFrame.pop

Created on 17 Sep 2019  路  7Comments  路  Source: databricks/koalas

Select one Series and drop it in the DataFrame in-place (see https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.pop.html?highlight=pop#pandas.DataFrame.pop)

Related to https://github.com/databricks/koalas/issues/362

enhancement

Most helpful comment

The pandas doc says pop takes str, but it also can take a tuple of str when a dataframe has multi-index columns.

@HyukjinKwon
Do you think this should be covered in docstring and tests?

All 7 comments

cc @harupy and @itholic, are you interested in this?

i'm working on it

@itholic thanks!

The pandas doc says pop takes str, but it also can take a tuple of str when a dataframe has multi-index columns.

@HyukjinKwon
Do you think this should be covered in docstring and tests?

That would be so nice if they are covered.

@harupy It sounds such a nice suggestion 馃槂
I just added DataFrame.pop with basic example at #791 ,
And will try to support with tuple for multi-index also as you commented.

Thanks for considering the multi-index columns support.
I believe now that we have a basic infrastructure to support multi-index columns and tuple names for Series and Index using column_index. Actually managing Spark column names with data_columns is less useful now. We should rather first handle column_index properly.
I'm still working on fixing existing APIs. Hopefully we can think of multi-index columns from the beginning when we add new APIs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brookewenig picture brookewenig  路  7Comments

HyukjinKwon picture HyukjinKwon  路  3Comments

timhughes picture timhughes  路  3Comments

fujikosu picture fujikosu  路  3Comments

shril picture shril  路  5Comments