Feature Request: pandas.DataFrame.from_records(New "Include" parameter) · Issue #15319 · pandas-dev/pandas (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

@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).