大数据分析
特征工程
代码语言:javascript
复制# -*- coding:utf-8 -*-
# /usr/bin/python
'''
@Author: Yan Errol
@Email:2681506@gmail.com
@Date: 2019-05-24 16:35
@File:
@Describe:
'''
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
def read_data(path):
'''
读取csv文件
:param path: 文件路径
:return: df数据格式
'''
df =pd.read_csv(path)
#print("df",df,type(df),id(df))
return df
def save_csv(df,save_path):
'''
df 保存csv
:param df: df
:return: 0
'''
df.to_csv(save_path, index = 1)
def show_data(data):
'''
数据异常值检测(质量分析)
:param data: df
:return: 0
'''
print(plt.rcParams.keys())
# plt.rcParams["front.sans-serif"] = ['SimHei'] # 设置中文标签字体
plt.rcParams["axes.unicode_minus"] = F