Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
handle nan values in DataFrame.update when overwrite=False #15593
Comments
|
yeah this looks like a bug. So a short-term fix is ok if you'd want to push that. |
jreback
added Difficulty Intermediate Dtypes Effort Low Reshaping
labels
Mar 6, 2017
jreback
added this to the
Next Major Release
milestone
Mar 6, 2017
mayukh18
commented
Mar 8, 2017
|
@cluoren are you doing it? else I can take it up. I have looked into it already. |
pcluo
added a commit
to pcluo/pandas
that referenced
this issue
Mar 8, 2017
|
|
pcluo |
02ebf34
|
pcluo
referenced
this issue
Mar 8, 2017
Closed
handle nan values in DataFrame.update when overwrite=False #15593 #15617
|
@mayukh18 just created a pull request. thx tho. |
jreback
modified the milestone: 0.20.0, Next Major Release
Mar 8, 2017
jreback
modified the milestone: 0.20.0, Next Major Release
Mar 23, 2017
pcluo
added a commit
to pcluo/pandas
that referenced
this issue
May 22, 2017
|
|
pcluo + pcluo |
39350e2
|
pcluo
added a commit
to pcluo/pandas
that referenced
this issue
May 22, 2017
|
|
pcluo |
ee999f7
|
pcluo
referenced
this issue
May 22, 2017
Merged
BUG: handle nan values in DataFrame.update when overwrite=False (#15593) #16430
pcluo
added a commit
to pcluo/pandas
that referenced
this issue
May 22, 2017
|
|
pcluo |
e6b11bd
|
pcluo
added a commit
to pcluo/pandas
that referenced
this issue
May 24, 2017
|
|
pcluo |
c832fdd
|
pcluo
added a commit
to pcluo/pandas
that referenced
this issue
May 24, 2017
|
|
pcluo |
d8bde84
|
pcluo
added a commit
to pcluo/pandas
that referenced
this issue
May 24, 2017
|
|
pcluo |
be7a230
|
pcluo
added a commit
to pcluo/pandas
that referenced
this issue
May 24, 2017
|
|
pcluo |
468a798
|
jreback
modified the milestone: 0.20.2, Next Major Release
May 24, 2017
jreback
closed this
in #16430
May 24, 2017
jreback
added a commit
that referenced
this issue
May 24, 2017
|
|
pcluo + jreback |
85080aa
|
TomAugspurger
added a commit
to TomAugspurger/pandas
that referenced
this issue
May 29, 2017
|
|
pcluo + TomAugspurger |
e735629
|
TomAugspurger
added a commit
that referenced
this issue
May 30, 2017
|
|
pcluo + TomAugspurger |
64655e7
|
stangirala
added a commit
to stangirala/pandas
that referenced
this issue
Jun 11, 2017
|
|
pcluo + stangirala |
87dd46d
|
olizhu
commented
Jun 16, 2017
|
The issue with NaN seems to be fixed in v0.20.2, but a similar problem still exists with NaT if it exists anywhere in the dataframe.
|
|
@olizhu could you search to see if we have an issue for that already (I don't recall seeing it before). If not, could you open a new issue for it? |
olizhu
referenced
this issue
Jun 16, 2017
Open
DataFrame.update crashes with overwrite=False when NaT present #16713
guillemborrell
added a commit
to guillemborrell/pandas
that referenced
this issue
Jul 7, 2017
|
|
pcluo + guillemborrell |
6f0b1b3
|
pcluo commentedMar 6, 2017
Code Sample
Problem description
I got TypeError: invalid type promotion error when updating a DF with a datetime column. The 2nd DF doesn't have this column. The error message is in the details (although bad formatted).
IMHO, the culpit is in the DataFrame.update. The block checking
mask.allshould be outside theifblock and applies to the caseoverwrite=Falseas well.C:\Users\pcluo\Anaconda3\lib\site-packages\pandas\core\frame.py in update(self, other, join, overwrite, filter_func, raise_conflict)
3845
3846 self[col] = expressions.where(mask, this, that,
-> 3847 raise_on_error=True)
3848
3849 # ----------------------------------------------------------------------
C:\Users\pcluo\Anaconda3\lib\site-packages\pandas\computation\expressions.py in where(cond, a, b, raise_on_error, use_numexpr)
228
229 if use_numexpr:
--> 230 return _where(cond, a, b, raise_on_error=raise_on_error)
231 return _where_standard(cond, a, b, raise_on_error=raise_on_error)
232
C:\Users\pcluo\Anaconda3\lib\site-packages\pandas\computation\expressions.py in _where_numexpr(cond, a, b, raise_on_error)
151
152 if result is None:
--> 153 result = _where_standard(cond, a, b, raise_on_error)
154
155 return result
C:\Users\pcluo\Anaconda3\lib\site-packages\pandas\computation\expressions.py in _where_standard(cond, a, b, raise_on_error)
126 def _where_standard(cond, a, b, raise_on_error=True):
127 return np.where(_values_from_object(cond), _values_from_object(a),
--> 128 _values_from_object(b))
129
130
TypeError: invalid type promotion