Currently CSV ADRIOs only support selecting columns by index:
csv.CSVFileN(
file_path=path_to_my_file,
dtype=np.int64,
key_col=1,
key_type="state_abbrev",
data_col=2,
skiprows=1,
)
However it's very common to have column headers, and in this case we could use the string names instead. Much less tedious and error prone, generally, especially when using CSV files with many columns.
Supplying a str value for a column would raise an error if column headers aren't available. Need to think through how to handle some edge-cases, like files with multiple header rows.
Currently CSV ADRIOs only support selecting columns by index:
However it's very common to have column headers, and in this case we could use the string names instead. Much less tedious and error prone, generally, especially when using CSV files with many columns.
Supplying a str value for a column would raise an error if column headers aren't available. Need to think through how to handle some edge-cases, like files with multiple header rows.