Questions tagged «series»

系列对象表示数据系列。这可以表示为Python Pandas中的SeriesCollection类(Java,C#)或Series类。

4
添加一列多数民众赞成在熊猫连续行差异的结果
可以说我有一个这样的数据框 A B 0 a b 1 c d 2 e f 3 g h 0、1、2、3是时间,a,c,e,g是一个时间序列,而b,d,f,h是另一个时间序列。我需要能够向原始数据帧添加两列,这是通过计算某些列的连续行的差异而获得的。 所以我需要这样的东西 A B dA 0 a b (a-c) 1 c d (c-e) 2 e f (e-g) 3 g h Nan 我在数据框/系列上看到了一个叫做diff的东西,但是它做的略有不同,因为第一个元素将变为Nan。
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.