官术网_书友最值得收藏!

The pandas way

Similar to Numpy, pandas offers an easy way to load text files into a pandas dataframe:

import pandas as pd
pd.read_csv(usecols=1)

Here the separation can be denoted by either sep or delimiter, which is set as comma , by default (CSV stands for comma-separated values).

There is a long list of less commonly used options available as to determine how different data formats, data types, and errors should be handled. You may refer to the documentation at http://pandas.pydata.org/pandas-docs/stable/generated/pandas.read_csv.html. Besides flat CSV files, Pandas also has other built-in functions for reading other common data formats, such as Excel, JSON, HTML, HDF5, SQL, and Google BigQuery.

To stay focused on data visualization, we will not dig deep into the methods of data cleaning in this book, but this is a survival skill set very helpful in data science. If interested, you can check out resources on data handling with Python.

主站蜘蛛池模板: 桐柏县| 顺义区| 汽车| 南京市| 安福县| 四子王旗| 岗巴县| 登封市| 天津市| 阳信县| 卢龙县| 昭觉县| 遵化市| 资兴市| 巴彦淖尔市| 伊吾县| 厦门市| 曲松县| 安阳市| 中卫市| 讷河市| 汤原县| 平潭县| 武山县| 建德市| 惠东县| 揭西县| 富民县| 维西| 海兴县| 六盘水市| 太和县| 白城市| 松江区| 伽师县| 建始县| 郑州市| 前郭尔| 巫溪县| 当雄县| 巫溪县|