- Hands-On Exploratory Data Analysis with Python
- Suresh Kumar Mukhiya Usman Ahmed
- 163字
- 2021-06-24 16:44:51
Steps involved
Let's look at the process of creating the line chart:
Load and prepare the dataset. We will learn more about how to prepare data in Chapter 4, Data Transformation. For this exercise, all the data is preprocessed.
Import the matplotlib library. It can be done with this command:
import matplotlib.pyplot as plt
3.lot the graph:
plt.plot(df)
4.isplay it on the screen:
plt.show()
Here is the code if we put it all together:
import matplotlib.pyplot as plt
plt.rcParams['figure.figsize'] = (14, 10)
plt.plot(df)
And the plotted graph looks something like this:
In the preceding example, we assume the data is available in the CSV format. In real-life scenarios, the data is mostly available in CSV, JSON, Excel, or XML formats and is mostly disseminated through some standard API. For this series, we assume you are already familiar with pandas and how to read different types of files. If not, it's time to revise pandas. Refer to the pandas documentation for further details: https://pandas-datareader.readthedocs.io/en/latest/.
- The Complete Rust Programming Reference Guide
- 企業級Java EE架構設計精深實踐
- Learning Apex Programming
- Linux核心技術從小白到大牛
- Java程序設計與實踐教程(第2版)
- Spring Boot Cookbook
- R大數據分析實用指南
- Learning Probabilistic Graphical Models in R
- 用戶體驗可視化指南
- C專家編程
- OpenCV with Python By Example
- 深度學習原理與PyTorch實戰(第2版)
- Solutions Architect's Handbook
- 硬件產品設計與開發:從原型到交付
- Web前端開發技術:HTML、CSS、JavaScript