1. 数据加载
假如进行房价的预测,这里加载的数据共1000条,共十个维度(十个特征),除了id以外,其余的都是自变量(9个可用)
import pandas as pd
import numpy as np
import os
import matplotlib.pyplot as plt
os.chdir(r"C:\Users\86177\Desktop")
df = pd.read_csv('sample_data_sets.csv')
print(df.columns)
print(df.shape)
–> 输出的结果为:
Index(['id', 'complete_year',
2021-11-01 13:59:52
149KB
ar
AS
c
1