import pandas as pd
from matplotlib import pyplot as plt
import seaborn as sns
df = pd.read_csv("D:\\课程学习\\机器学习\\银行客户开设定期存款账户情况预测\\banking.csv")
print("1.the shape of the DataFrame")
print(df.shape)
print("2.the head of the DataFrame")
print(df.head())
print("3.the info of the DataFrame")
print(df.info())
print("4.the statistical description of the DataFrame")
print(df.describe())
print("5.Check for any null values in the DataFrame")
datacheck = df.isnull().any()
print(datacheck)
print("6.Check for duplicates")
duplicates = df.duplicated()
print(f"Number of duplicated rows: {duplicates.sum()}")
print("7.See the duplicated rows")
if duplicates.sum() > 0:
print("\nDuplicated Rows:")
print(df[duplicates])
non_numeric_columns = df.select_dtypes(exclude=['number']).columns.to_list()
numeric_columns = df.select_dtypes(include=['number']).columns
print(non_numeric_columns)