ECSVEnginePandas#
- class astropy.io.misc.ecsv.ECSVEnginePandas[source]#
Bases:
ECSVEngineECSV reader engine using pandas.
Attributes Summary
Methods Summary
convert_np_type(np_type)Convert a numpy type string to engine-specific type for parsing.
get_data_kwargs(header, null_values)Generate a dictionary of keyword arguments for data parsing.
Attributes Documentation
- format = 'pandas.csv'#
- name = 'pandas'#
Methods Documentation
- convert_np_type(np_type)[source]#
Convert a numpy type string to engine-specific type for parsing.
For instance, for pandas the
"int32"numpy type gets converted to anInt32Dtype()instance to read columns as a nullable int32.- Parameters:
- np_type
python:str The numpy type string to be converted.
- np_type
- Returns:
AnyCorresponding engine-specific type.
- get_data_kwargs(header, null_values)[source]#
Generate a dictionary of keyword arguments for data parsing.
This accounts for the API variations in each engine CSV reader.
- Parameters:
- header
ECSVHeader ECSVHeader object within header information.
- null_values
python:listofpython:str List of strings with values to be interpreted as null or missing data.
- header
- Returns:
python:dict[python:str,Any]Dict of keyword arguments to be passed to engine CSV reader.