DataFrame.drop
Drop specified labels from rows or columns.Remove rows or columns by specifying label names and corresponding axis.
danfo.DataFrame.drop(options)
Parameters | Type | Description | Default |
---|---|---|---|
options | Object | { columns: Array of column names to drop. index: Array of index labels to drop. inplace: Boolean indicating whether to perform the operation inplace or not. Defaults to false } | {**inplace:**false} |
Returns:
**** return DataFrame
Examples
Drop columns by specifying the names
By setting inplace to true, the original DataFrame is modified and nothing is returned. To not modify the original DataFrame and return a new one, set inplace to false or leave it as default.
Drop rows by specifying int labels/index
Drop rows by specifying string labels/index
Last updated