Relative Content

Tag Archive for pythonpandasread-csv

Pandas read csv simultaneously passing usecols and names args

When reading a CSV file as a pandas dataframe, an error is raised when trying to select a subset of columns based on original column names (usecols=) and renaming the selected columns (names=). Passing renamed column names to usecols works, but all columns must be passed to names to correctly select columns.