- Matplotlib 2.x By Example
- Allen Yu Claire Chung Aldrin Yim
- 154字
- 2021-07-02 19:34:33
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.
- 從零開始:數字圖像處理的編程基礎與應用
- Spring Cloud Alibaba微服務架構設計與開發(fā)實戰(zhàn)
- HoloLens Beginner's Guide
- Android Development with Kotlin
- iOS應用逆向工程(第2版)
- Big Data Analytics
- SQL Server從入門到精通(第3版)
- Teaching with Google Classroom
- Instant PHP Web Scraping
- Java SE實踐教程
- SQL Server實例教程(2008版)
- Visual C++程序設計全程指南
- C#網絡程序開發(fā)(第二版)
- 小小的Python編程故事
- Java從入門到精通(第7版)