Skip to content

Update truncate() documentation and testcases #13024

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
wants to merge 2 commits into from
Closed

Update truncate() documentation and testcases #13024

wants to merge 2 commits into from

Conversation

gliptak
Copy link
Contributor

@gliptak gliptak commented Apr 29, 2016

@@ -1560,6 +1560,17 @@ def test_truncate_fillna_bug(self):
# it works!
result.fillna(value=0.0)

def test_truncate_outofbounds(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's move the .truncate tests to test_generic instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and use the generic features to test Series/DataFrame/Panel

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you said done, but it doesn't appear to be pushed. you need to use _construct

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest (force) push uses assert_series_equal below. Were you pointing out something different you would like to see?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to structure the test so its runnable in all of the sub-classses Testers so its tested on Series/DataFrame etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got you. I ran into issues (memory, indeces) when trying to generalize, so decided to move it under Series (only).

@jreback jreback added the Testing pandas testing functions or related to the test suite label Apr 29, 2016
@jreback jreback added this to the 0.18.2 milestone Apr 29, 2016
@gliptak
Copy link
Contributor Author

gliptak commented Apr 29, 2016

I'm not sure what to make of those codecov failures ...

@jreback jreback modified the milestones: 0.18.1, 0.18.2 Apr 30, 2016
@jreback
Copy link
Contributor

jreback commented May 1, 2016

just do the big selection across the 0th dimension

@gliptak
Copy link
Contributor Author

gliptak commented May 1, 2016

The actual tests were OK (although I seen OutOfMemory exceptions ...), but the _construct wasn't.

For Series/DataFrame self._construct(,index=,...) vs for Panel/Panel4D self._construct(,major_axis=,minor_axis=,...) In this test I have to have the particular index.

How do you merge these?

@gliptak
Copy link
Contributor Author

gliptak commented May 2, 2016

Are you OK with this being under Series?

@jreback
Copy link
Contributor

jreback commented May 2, 2016

you need to make this generic, so no

@gliptak
Copy link
Contributor Author

gliptak commented May 2, 2016

@jreback Please offer some snippets on how you see this being make generic (I described what I ran into in the previous post). Thanks

@gliptak
Copy link
Contributor Author

gliptak commented May 5, 2016

@jreback How do you see this moving forward? Thanks

@jreback
Copy link
Contributor

jreback commented May 6, 2016

so in test_generic.py you can construct something generic like this:

shape = [int(1e6)] + ([1] * len(self._ndim-1)]
obj = self._construct(shape)

so will give you the first dim of 1e6 and the others 1

@gliptak
Copy link
Contributor Author

gliptak commented May 6, 2016

@jreback Thank you. I made the changes, the 2e6 takes a long time to run locally (in Panel) ...

@gliptak
Copy link
Contributor Author

gliptak commented May 6, 2016

Timing out in travis-ci too No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.

@jreback jreback closed this in 744d27e May 7, 2016
@jreback
Copy link
Contributor

jreback commented May 7, 2016

thanks @gliptak

the panel comparator was doing things a very slow way. all fixed up.

@gliptak
Copy link
Contributor Author

gliptak commented May 7, 2016

@jreback Thank you for fixing Panel comparator.

@gliptak gliptak deleted the truncate1 branch May 10, 2016 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

truncate() raises IndexError on large timeseries
2 participants