Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

yonil7 opened this issue Jan 6, 2016 · 5 comments
Labels
Numeric Operations Arithmetic, Comparison, and Logical operations
Milestone

Comments

@yonil7
Copy link

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 jreback added the Numeric Operations Arithmetic, Comparison, and Logical operations label Jan 6, 2016
@jreback jreback added this to the Next Major Release milestone Jan 6, 2016
@jreback
Copy link
Contributor

jreback commented Jan 6, 2016

xref for rolling versions of kurt/skew: #8270

we fixed this for var here: #10679

interested in doing a similar fix for kurt/skew?

@jreback
Copy link
Contributor

jreback commented Jan 6, 2016

cc @jvkersch

@jvkersch
Copy link

jvkersch commented Jan 7, 2016

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

@jreback
Copy link
Contributor

jreback commented Jan 7, 2016

@jvkersch that would be great!

@jreback jreback modified the milestones: 0.18.0, Next Major Release Jan 24, 2016
@jreback
Copy link
Contributor

jreback commented Jan 25, 2016

closed by #12121

@jreback jreback closed this as completed Jan 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Numeric Operations Arithmetic, Comparison, and Logical operations
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants