- Python:Data Analytics and Visualization
- Phuong Vo.T.H Martin Czygan Ashish Kumar Kirthi Raman
- 269字
- 2021-07-09 18:51:43
Summary
In this chapter we showed how you can work with time series in Pandas. We introduced two index types, the DatetimeIndex
and the TimedeltaIndex
and explored their building blocks in depth. Pandas comes with versatile helper functions that take much of the pain out of parsing dates of various formats or generating fixed frequency sequences. Resampling data can help get a more condensed picture of the data, or it can help align various datasets of different frequencies to one another. One of the explicit goals of Pandas is to make it easy to work with missing data, which is also relevant in the context of upsampling.
Finally, we showed how time series can be visualized. Since matplotlib and Pandas are natural companions, we discovered that we can reuse our previous knowledge about matplotlib for time series data as well.
In the next chapter, we will explore ways to load and store data in text files and databases.
Practice exercises
Exercise 1: Find one or two real-world examples for data sets, which could – in a sensible way – be assigned to the following groups:
- Fixed frequency data
- Variable frequency data
- Data where frequency is usually measured in seconds
- Data where frequency is measured in nanoseconds
- Data, where a
TimedeltaIndex
would be preferable
Create various fixed frequency ranges:
- Every minute between 1 AM and 2 AM on 2000-01-01
- Every two hours for a whole week starting 2000-01-01
- An entry for every Saturday and Sunday during the year 2000
- An entry for every Monday of a month, if it was a business day, for the years 2000, 2001 and 2002
- Word 2000、Excel 2000、PowerPoint 2000上機指導與練習
- 高性能混合信號ARM:ADuC7xxx原理與應用開發
- 空間機器人遙操作系統及控制
- Drupal 7 Multilingual Sites
- 圖形圖像處理(Photoshop)
- MicroPython Projects
- 完全掌握AutoCAD 2008中文版:綜合篇
- 悟透AutoCAD 2009完全自學手冊
- Learning Azure Cosmos DB
- 貫通開源Web圖形與報表技術全集
- 51單片機應用程序開發與實踐
- PowerPoint 2003中文演示文稿5日通
- 巧學活用AutoCAD
- D3.js Quick Start Guide
- 小數據之美:精準捕捉未來的商業小趨勢