drop#
- NestSeriesAccessor.drop(column: str | list[str]) NestedSeries[source]#
Remove the column(s) from the series and return a new series
Note, that at least one nested column must be left in the series.
- Parameters:
column (str or list[str]) – Name of the column(s) to remove.
- Returns:
The new series without the column(s).
- Return type:
Examples
>>> from nested_pandas.datasets.generation import generate_data >>> nf = generate_data(5, 2, seed=1)
>>> nf["nested"].nest.drop("flux") 0 [{t: 8.38389, flux_error: 1.0, band: 'r'}; …] ... 1 [{t: 13.70439, flux_error: 1.0, band: 'g'}; …]... 2 [{t: 4.089045, flux_error: 1.0, band: 'g'}; …]... 3 [{t: 17.562349, flux_error: 1.0, band: 'r'}; …... 4 [{t: 0.547752, flux_error: 1.0, band: 'g'}; …]... Name: nested, dtype: nested<t: [double], flux_error: [double], band: [string]>