read_csv
- ssapy.io.read_csv(file_name, sep=None, dtypes=None, col=False, to_np=False, drop_nan=False, skiprows=[])[source][source]
Read a CSV file with options.
- Parameters:
file_name (str) – The path to the CSV file.
sep (str, optional) – The delimiter used in the CSV file. If None, delimiter will be guessed.
dtypes (dict, optional) – Dictionary specifying data types for columns.
col (bool or list of str, optional) – Specify columns to read. If False, read all columns.
to_np (bool, optional) – Convert the loaded data to a NumPy array.
drop_nan (bool, optional) – Drop rows with missing values (NaNs) from the loaded DataFrame.
skiprows (list of int, optional) – Rows to skip while reading the CSV file.
- Returns:
The loaded data in either a DataFrame or a NumPy array format.
- Return type:
DataFrame or NumPy array