astro.dataframes.load_options
Module Contents
Classes
Pandas load options while reading and loading file |
|
Pandas load options while reading and loading csv file. |
|
Pandas load options while reading and loading json file. |
|
Pandas load options while reading and loading Ndjson file. |
|
Pandas load options while reading and loading Parquet file. |
- class astro.dataframes.load_options.PandasLoadOptions
Bases:
astro.options.LoadOptions
Pandas load options while reading and loading file
- class astro.dataframes.load_options.PandasCsvLoadOptions
Bases:
PandasLoadOptions
Pandas load options while reading and loading csv file.
- Parameters
delimiter – Delimiter to use. Defaults to None
dtype – Data type for data or columns. E.g.
{"a": np.float64, "b": np.int32, "c": "Int64"}
Use str or object together with suitable na_values settings to preserve and not interpret dtype. If converters are specified, they will be applied INSTEAD of dtype conversion.
- delimiter: str | None
- dtype: DtypeArg | None
- class astro.dataframes.load_options.PandasJsonLoadOptions
Bases:
PandasLoadOptions
Pandas load options while reading and loading json file.
- Parameters
encoding – Encoding to use for UTF when reading/writing (ex. ‘utf-8’). List of Python standard encodings: https://docs.python.org/3/library/codecs.html#standard-encodings
- encoding: str | None
- class astro.dataframes.load_options.PandasNdjsonLoadOptions
Bases:
PandasLoadOptions
Pandas load options while reading and loading Ndjson file.
- Parameters
normalize_sep – separator used to normalize nested ndjson. ex -
{"a": {"b":"c"}}
will result in:column - "a_b"
wherendjson_normalize_sep = "_"
- normalize_sep: str = '_'
- class astro.dataframes.load_options.PandasParquetLoadOptions
Bases:
PandasLoadOptions
Pandas load options while reading and loading Parquet file.
- Parameters
columns – If not None, only these columns will be read from the file.
- columns: list[str] | None