File size: 481 Bytes
ee594f0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 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()) |