clarite.load.from_csv

clarite.load.from_csv(filename: str, index_col: Union[str, int, NoneType] = 0, **kwargs)

Load data from a comma-separated file into a DataFrame

Parameters:
filename: str or Path

File with data to be used in CLARITE

index_col: int or string (default 0)

Column to use as the row labels of the DataFrame.

**kwargs:

Other keword arguments to pass to pd.read_csv

Returns:
DataFrame

The index column will be used when merging

Examples

Load a tab-delimited file with an “ID” column

>>> import clarite
>>> df = clarite.import.from_csv('nhanes.csv', index_col="SEQN")
Loaded 22,624 observations of 970 variables