下载missingno文档,解压到项目同一文件夹下。
链接:https://share.weiyun.com/I6eHxC6Q 密码:vx5x4r
数据集文档csv
链接:https://share.weiyun.com/b0rElSNA 密码:efygdy
dataname | datameans | datatype |
bike_name | full name of the bike | object |
price | resale price of the bike | int64 |
city | city where Bike was listed | object |
kms_driven | kilometers driven by bike | int64 |
owner | number of owners of the bike | object |
age | age of the bike | int64 |
power | power of the bike in CC | int64 |
brand | brand of the bike | object |
一、数据读取与分析
"""
Created on Tue Jun 2 01:80:694 2021
@author: Win7
"""
#20180694#
import numpy as np
import pandas as pd
from pandas import datetime
#pandas文档:http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.html#pandas.DataFrame
#作图库
import matplotlib.pyplot as plt
#matplotlib文档:https://matplotlib.org/gallery/index.html
import seaborn as sns
import missingno as msno # missing values 缺失值可视化展示
#20180694
#missingno文档 https://github.com/ResidentMario/missingno
#***务必下载missingno压缩包,解压到项目所在文件夹***
#适用于jupyter notebook,spyder等编辑器
%matplotlib inline
# machine learning 机器学习工具包
from statsmodels.distributions.empirical_distribution import ECDF #ECDF:累积分布函数
from sklearn.metrics import mean_squared_error, r2_score#2
from sklearn.preproc