20 lines
533 B
Python
20 lines
533 B
Python
|
|
#!/usr/bin/env python3
|
||
|
|
import pandas as pd
|
||
|
|
import numpy as np
|
||
|
|
|
||
|
|
DATA_PATH = "/Users/anthony/ai_lesson/ai_zhangzhongshan/心血管疾病.xlsx"
|
||
|
|
|
||
|
|
try:
|
||
|
|
df = pd.read_excel(DATA_PATH, engine='openpyxl')
|
||
|
|
print("Data loaded successfully!")
|
||
|
|
print(f"Shape: {df.shape}")
|
||
|
|
print("\nColumns:")
|
||
|
|
print(df.columns.tolist())
|
||
|
|
print("\nFirst few rows:")
|
||
|
|
print(df.head())
|
||
|
|
print("\nData types:")
|
||
|
|
print(df.dtypes)
|
||
|
|
print("\nMissing values:")
|
||
|
|
print(df.isnull().sum())
|
||
|
|
except Exception as e:
|
||
|
|
print(f"Error: {e}")
|