Download code/checkdata.py from unknownBrain/survivalanalysis_checkpointing: direct link, hf CLI and curl.
- Browser
- Download file 481 Bytes
-
https://huggingface.co/datasets/unknownBrain/survivalanalysis_checkpointing/resolve/main/code/checkdata.py
- Command line
-
hf download hf://datasets/unknownBrain/survivalanalysis_checkpointing/code/checkdata.py
-
curl -L -o checkdata.py https://huggingface.co/datasets/unknownBrain/survivalanalysis_checkpointing/resolve/main/code/checkdata.py
481 Bytes
| import pandas as pd | |
| # Path to your metadata file | |
| file_path = "clinicaldata.csv" | |
| # Load the data as a CSV | |
| # If it throws a Unicode error, sometimes adding encoding='latin1' or encoding='utf-8-sig' helps | |
| try: | |
| df = pd.read_csv(file_path) | |
| except UnicodeDecodeError: | |
| df = pd.read_csv(file_path, encoding='latin1') | |
| # Print the column names | |
| print("Available columns in the dataset:") | |
| print(df.columns.tolist()) | |
| # Show the first 5 rows | |
| print("\nFirst 5 rows:") | |
| print(df.head()) |