Skip to content

Feature Request: pandas.DataFrame.from_records(New "Include" parameter) #15319

Closed
@alexlenail

Description

@alexlenail

Pandas Dataframe.from_records has an Exclude parameter:

exclude : sequence, default None
Columns or fields to exclude

The logic for column exclusion can be found here.

Since for my specific use case, I'd like to exclude most of my columns, and would rather just specify which columns to include, I'd love to also see an Include parameter here.

Arbitrarily, if a field were both Included and Excluded it could be excluded (or throw an error).

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementReshapingConcat, Merge/Join, Stack/Unstack, Explode

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions