qis.load_df_from_csv¶
- qis.load_df_from_csv(file_name=None, local_path=None, folder_name=None, key=None, is_index=True, parse_dates=True, dayfirst=None, tz=None, drop_duplicated=False, file_type=FileTypes.CSV, float_precision=None)[source]¶
read one DataFrame from a CSV under the managed path layout.
- Parameters:
file_name (str | None) – base file name without extension
local_path (str | None) – directory to read from. None resolves to the working directory
folder_name (str) – subdirectory under
local_pathkey (str) – suffix appended to
file_name, for one file per keyis_index (bool) – read the first column as the index. False leaves a RangeIndex
parse_dates (bool) – parse the index as dates. Applies only when
is_indexdayfirst (bool | None) – interpret ambiguous dates as day-first. None leaves it to pandas, which is month-first, so set it True for European-formatted files
tz (str) – timezone to localise the index to. None leaves it naive
drop_duplicated (bool) – drop duplicated index entries, keeping the first
file_type (FileTypes) – CSV or CSV_GZ
float_precision (str | None) – float converter pandas reads the file with. None uses pandas’ default C converter, which is fast and NOT correctly rounded: a written-then-read float can differ from the original in its last bit. Pass ‘round_trip’ when the read has to return exactly what was written, e.g. when a stored panel is compared against the frame that produced it
- Returns:
the frame, with a DatetimeIndex when
is_indexandparse_dates- Raises:
ValueError – if
file_typeis neither CSV nor CSV_GZ- Return type: