Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class NDFrame(PandasObject):
copy : boolean, default False
"""
_internal_names = ['_data', '_cacher', '_item_cache', '_cache',
'is_copy', '_subtyp', '_index', '_default_kind',
'is_copy', 'str', '_subtyp', '_index', '_default_kind',
'_default_fill_value','__array_struct__','__array_interface__']
_internal_names_set = set(_internal_names)
_metadata = []
Expand Down Expand Up @@ -616,7 +616,7 @@ def equals(self, other):
if not isinstance(other, self._constructor):
return False
return self._data.equals(other._data)

#----------------------------------------------------------------------
# Iteration

Expand Down
12 changes: 9 additions & 3 deletions pandas/src/properties.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ cdef class cache_readonly(object):

cache = getattr(obj, '_cache', None)
if cache is None:
cache = obj._cache = {}
try:
cache = obj._cache = {}
except (AttributeError):
return

if PyDict_Contains(cache, self.name):
# not necessary to Py_INCREF
Expand All @@ -40,10 +43,13 @@ cdef class cache_readonly(object):
# Get the cache or set a default one if needed
cache = getattr(obj, '_cache', None)
if cache is None:
cache = obj._cache = {}
try:
cache = obj._cache = {}
except (AttributeError):
return

PyDict_SetItem(cache, self.name, value)

cdef class AxisProperty(object):
cdef:
Py_ssize_t axis
Expand Down
5 changes: 5 additions & 0 deletions pandas/tests/test_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ class TestStringMethods(tm.TestCase):

_multiprocess_can_split_ = True

def test_api(self):

# GH 6106
self.assert_(Series.str is None)

def test_iter(self):
# GH3638
strs = 'google', 'wikimedia', 'wikipedia', 'wikitravel'
Expand Down