Series.skew() for constant series returns inconsistent values #11974

Closed
yonil7 opened this Issue Jan 6, 2016 · 5 comments

Comments

Projects
None yet
3 participants

yonil7 commented Jan 6, 2016

I'm not sure if this is a bug, but I'v noticed a strange behavior of skew() and kurt() on constant series:

#skew:
pd.Series(3075.3, np.arange(300)).skew() #returns -105683727.49921818
pd.Series(3075.2, np.arange(300)).skew() #returns nan
pd.Series(3075.5, np.arange(300)).skew() #returns 0

#kurt:
pd.Series(3075.3, np.arange(300)).kurt() #returns 9305221026420888.0
pd.Series(3075.2, np.arange(300)).kurt() #returns -7459707710545691.0
pd.Series(3075.5, np.arange(300)).kurt() #returns 0

(using pandas 0.17.1 (from anacondas) on a 64bit intel windows 7 pc)

jreback added the Numeric label Jan 6, 2016

jreback added this to the Next Major Release milestone Jan 6, 2016

Contributor

jreback commented Jan 6, 2016

xref for rolling versions of kurt/skew: pydata#8270

we fixed this for var here: pydata#10679

interested in doing a similar fix for kurt/skew?

Contributor

jreback commented Jan 6, 2016

Contributor

jvkersch commented Jan 7, 2016

I can pick this up some time next week, if there are no other takers.

Contributor

jreback commented Jan 7, 2016

@jvkersch that would be great!

@jreback jreback modified the milestone: 0.18.0, Next Major Release Jan 24, 2016

Contributor

jreback commented Jan 25, 2016

closed by #12121

jreback closed this Jan 25, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment