| Data Evaluation |

- Use Shift + Enter or Shift + Return to run the upper box so as to make it display the edited text format.

- Markdown used for text writing, while the other is Code cell used for code writing.

import csv
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn
%matplotlib inline

  # Import/load the data set use the read_csv function of Pandas

Shanghai_data = pd.read_csv('ShanghaiPM20100101_20151231.csv')

  # View the basic information of data by means of head, info and describe.

Shanghai_data.head()
Shanghai_data.info()

  # Print type of python object

print(type(Shanghai_data['cbwd'][0]))

  # Change the space into an underline

Shanghai_data.columns = [c.replace(' ', '_') for c in Shanghai_data.columns]

  # Convert the numerical value of 1, 2, 3, 4 to four corresponding seasons (by means of the map method of Pandas):

Shanghai_data['season'] = Shanghai_data['season'].map({1:'Spring', 2:'Summer', 3:'Autumn', 4: 'Winter'})

- Check data missing and data type:

  # Print the length of data

print("The number of row in this dataset is ",len(Shanghai_data.index))

  # Calculating the number of records in column "PM_Jingan"

print("There number of missing data records in PM_Jingan is: ",len(Shanghai_data.index) - len(Shanghai_data['PM_Jingan'].dropna()))

Note: # “dropna()” function used in the following code can delete missing value in data.

Learning notes | Data Analysis: 1.1 data evaluation的更多相关文章

  1. Learning notes | Data Analysis: 1.2 data wrangling

    | Data Wrangling | # Sort all the data into one file files = ['BeijingPM20100101_20151231.csv','Chen ...

  2. How to use data analysis for machine learning (example, part 1)

    In my last article, I stated that for practitioners (as opposed to theorists), the real prerequisite ...

  3. Learning Spark: Lightning-Fast Big Data Analysis 中文翻译

    Learning Spark: Lightning-Fast Big Data Analysis 中文翻译行为纯属个人对于Spark的兴趣,仅供学习. 如果我的翻译行为侵犯您的版权,请您告知,我将停止 ...

  4. An Introduction to Stock Market Data Analysis with R (Part 1)

    Around September of 2016 I wrote two articles on using Python for accessing, visualizing, and evalua ...

  5. 《利用Python进行数据分析: Python for Data Analysis 》学习随笔

    NoteBook of <Data Analysis with Python> 3.IPython基础 Tab自动补齐 变量名 变量方法 路径 解释 ?解释, ??显示函数源码 ?搜索命名 ...

  6. Python for Data Analysis

    Data Analysis with Python ch02 一些有趣的数据分析结果 Male描述的是美国新生儿男孩纸的名字的最后一个字母的分布 Female描述的是美国新生儿女孩纸的名字的最后一个字 ...

  7. 深入浅出数据分析 Head First Data Analysis Code 数据与代码

    <深入浅出数据分析>英文名为Head First Data Analysis Code, 这本书中提供了学习使用的数据和程序,原书链接由于某些原因不 能打开,这里在提供一个下载的链接.去下 ...

  8. 数据分析---《Python for Data Analysis》学习笔记【04】

    <Python for Data Analysis>一书由Wes Mckinney所著,中文译名是<利用Python进行数据分析>.这里记录一下学习过程,其中有些方法和书中不同 ...

  9. 数据分析---《Python for Data Analysis》学习笔记【03】

    <Python for Data Analysis>一书由Wes Mckinney所著,中文译名是<利用Python进行数据分析>.这里记录一下学习过程,其中有些方法和书中不同 ...

随机推荐

  1. ‘ActiveX component can’t create object解决方法

    Event Type:    WarningEvent Source:    Health Service ScriptEvent Category:    NoneEvent ID:    1Dat ...

  2. 运维监控---企业级Zabbix详解_【all】

    基础LNMP环境搭建 Linux 下LNMP环境搭建 下载Zabbix 链接:https://pan.baidu.com/s/1n36esVyYAKstwnFopbV2sg 密码:izll 创建zab ...

  3. 深圳云栖大会人工智能专场:探索视频+AI,玩转智能视频应用

    摘要: 在人工智能时代,AI技术是如何在各行业和领域真正的发挥应用和商业价值,带来产业变革才是关键.在3月28日深圳云栖大会的人工智能专场中,阿里云视频服务技术专家邹娟将带领大家探索熟悉的视频场景中, ...

  4. MySQL 数据库 -- 数据操作

    数据的增删改 一 介绍 MySQL数据操作: DML ======================================================== 在MySQL管理软件中,可以通过 ...

  5. JavaScript学习记录总结(八)——全选、反选

    <!DOCTYPE html><html><head><title>checkboxs.html</title> <meta name ...

  6. numeric_limits<>函数

    因为比较有用,所以自己试验并且翻译了一下,很可能有错误,希望发现错误的朋友能给我留言纠正,谢谢! 有部分没有翻译,因为还没弄清楚到底什么作用 numeric_limits是模板类. 需要注意的是返回值 ...

  7. java project如何连接数据库

    1,首先从mysql的官网上下载mysql-connector-java-5.1.44.zip 2,选择downloads下的community 3,在Community下选择MySql Connec ...

  8. Luogu_4886 快递员

    Luogu_4886 快递员 一道淀粉质的题目. 先考虑最简单的算法,那便是对每个点都求一边.时间复杂度O(NM) 然后如果我们把每个点的结果对应一个高度,我们会发现.最优解是在这个对应高度形成的三维 ...

  9. HomeKit 开发指南(中文版)

    转载自cocoachina 本文由CocoaChina翻译组成员iBenjamin_Go和浅夏@旧时光翻译自苹果开发文档:HomeKit Developer Guide,敬请勘误. 本文档内容包括 第 ...

  10. 翻译 TI SerialBLEbridge V 1.4.1

    原文地址:http://processors.wiki.ti.com/index.php/SerialBLEbridge_V_1.4.1 Sample App Overview This page d ...