clarite.load.from_tsv¶
-
clarite.load.
from_tsv
(filename: str, index_col: Union[str, int, None] = 0, **kwargs)¶ Load data from a tab-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 keyword 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.load.from_tsv('nhanes.txt', index_col="SEQN") Loaded 22,624 observations of 970 variables