- 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
- 現(xiàn)代測控系統(tǒng)典型應(yīng)用實(shí)例
- 協(xié)作機(jī)器人技術(shù)及應(yīng)用
- 西門子S7-200 SMART PLC從入門到精通
- 可編程控制器技術(shù)應(yīng)用(西門子S7系列)
- 傳感器與物聯(lián)網(wǎng)技術(shù)
- 基于Xilinx ISE的FPAG/CPLD設(shè)計(jì)與應(yīng)用
- 計(jì)算機(jī)與信息技術(shù)基礎(chǔ)上機(jī)指導(dǎo)
- R Data Analysis Projects
- 單片機(jī)技能與實(shí)訓(xùn)
- 智能鼠原理與制作(進(jìn)階篇)
- 重估:人工智能與賦能社會(huì)
- 機(jī)床電氣控制與PLC
- 中國戰(zhàn)略性新興產(chǎn)業(yè)研究與發(fā)展·數(shù)控系統(tǒng)
- 計(jì)算機(jī)辦公應(yīng)用培訓(xùn)教程
- Flash CS3動(dòng)畫制作