-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Ensure min_itemsize is always a list (#11412) #14728
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
Conversation
Current coverage is 85.21% (diff: 50.00%)@@ master #14728 diff @@
==========================================
Files 144 143 -1
Lines 50947 50804 -143
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
- Hits 43445 43293 -152
- Misses 7502 7511 +9
Partials 0 0
|
this is technically an API change because we currently store the So i would prefer to keep this as a list for now, though see if you can create a tests which fails on this. |
the issue you reference is closed. so what issue is this fixing? |
Regarding the issue: yes, it is closed, but not solved, it is different from the #11364 you referred to. I can open a new issue if you prefer. But the thing is: I am not solving #11364 here, I am solving #11412, which is different. Regarding the My motivation was that in some cases |
then are you solving this? #10381 |
https://github.com/pandas-dev/pandas/blob/master/pandas/io/pytables.py#L3129 you would need to be pretty careful about this (though not 100% sure it actually matters). It would be nice to be consistent, though everything is a list. yes so bottom line is, keep it a list. If you have a repro where its NOT a list. then pls show that. |
e3fb504
to
1f70a6e
Compare
OK, new version works with lists rather than indices. No, I'm not fixing #10381, otherwise I wouldn't have written that I plan to fix it when I opened the PR ... |
The AppVeyor failure is a bug in AppVeyor, right? |
I restarted. it sometimes does get stuck. |
again... |
ping |
|
||
|
||
|
||
- Bug in ``HDFStore.append()`` with Series and 'index' appearing in ``min_itemsize`` (:issue:`11412`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a little bit more verbose as I don't understand what you are fixing.
@@ -4254,7 +4254,7 @@ def write(self, obj, data_columns=None, **kwargs): | |||
if data_columns is None: | |||
data_columns = [] | |||
elif data_columns is True: | |||
data_columns = obj.columns[:] | |||
data_columns = list(obj.columns) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was just fixed in #14791
@@ -4153,7 +4153,7 @@ def write(self, obj, data_columns=None, **kwargs): | |||
obj = DataFrame({name: obj}, index=obj.index) | |||
obj.columns = [name] | |||
return super(AppendableSeriesTable, self).write( | |||
obj=obj, data_columns=obj.columns, **kwargs) | |||
obj=obj, data_columns=list(obj.columns), **kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use obj.columns.tolist()
to be consistent
|
||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
put underneath the whatsnew for #14791
1f70a6e
to
e25cd1f
Compare
Stuck again |
thanks! |
closes #11412 Author: Pietro Battiston <[email protected]> Closes #14728 from toobaz/minitemsizefix and squashes the following commits: e25cd1f [Pietro Battiston] Whatsnew b9bb88f [Pietro Battiston] Tests for previous commit 6406ee8 [Pietro Battiston] BUG: Ensure min_itemsize is always a list (cherry picked from commit 53bf1b2)
git diff upstream/master | flake8 --diff
(I plan to fix #10381 and #12154 next, but first we need coherence on
type(data_columns)
- andIndex
seems to me the best option.)