File size: 308 Bytes
b9a43be
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import pandas as pd

def load_csv(file_path):
    try:
        df = pd.read_csv(file_path)
        return df, None
    except Exception as e:
        return None, str(e)

def preview_dataframe(df, num_rows=5):
    return df.head(num_rows)

def get_column_names(df):
    return list(df.columns)