Spaces:
Running
Running
File size: 841 Bytes
9a6a4dc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
import pandas as pd
def read_excel_file(file_path):
try:
# Read the Excel file
df = pd.read_excel(file_path)
# Display the first few rows of the DataFrame
print(df.head())
# Check the data types of the columns
print(df.dtypes)
# Check for missing values
print(df.isnull().sum())
return df
except Exception as e:
print(f"Error reading file: {e}")
return null
# Specify the file path
file_path = '/tmp/tmpyih3q44z.xlsx'
# Read the Excel file
df = read_excel_file(file_path)
# Check for missing values
print(df.isnull().sum())
# Display the first few rows of the DataFrame
print(df.head())
# Check the data types of the columns
print(df.dtypes)
# Check summary statistics
print(df.describe(include='all')) |