Skip to content

Commit

Permalink
BUG: fixed null-check per #839
Browse files Browse the repository at this point in the history
  • Loading branch information
adamklein committed Feb 29, 2012
1 parent 4d50f03 commit 3050bf2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,9 +520,9 @@ def _set_labels(self, key, value):
self._set_values(indexer, value)

def _set_values(self, key, value):
if (isnull(value) and
issubclass(self.dtype.type, (np.integer, np.bool_))):
raise ValueError('Cannot assign nan to integer series')
if issubclass(self.dtype.type, (np.integer, np.bool_)):
if np.isscalar(value) and isnull(value):
raise ValueError('Cannot assign nan to integer series')

self.values[key] = value

Expand Down

0 comments on commit 3050bf2

Please sign in to comment.