Skip to content

Commit 84c3555

Browse files
committed
BUG: pickle compat with UTC tz's
closes #16608
1 parent bf99975 commit 84c3555

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

pandas/compat/pickle_compat.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def load_reduce(self):
1515
args = stack.pop()
1616
func = stack[-1]
1717

18-
if type(args[0]) is type:
18+
if len(args) and type(args[0]) is type:
1919
n = args[0].__name__ # noqa
2020

2121
try:
Binary file not shown.

pandas/tests/io/generate_legacy_storage_files.py

100644100755
+7-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/env/bin python
2+
13
""" self-contained to write legacy storage (pickle/msgpack) files """
24
from __future__ import print_function
35
from warnings import catch_warnings
@@ -125,7 +127,11 @@ def create_data():
125127
mixed_dup=mixed_dup_df,
126128
dt_mixed_tzs=DataFrame({
127129
u'A': Timestamp('20130102', tz='US/Eastern'),
128-
u'B': Timestamp('20130603', tz='CET')}, index=range(5))
130+
u'B': Timestamp('20130603', tz='CET')}, index=range(5)),
131+
dt_mixed2_tzs=DataFrame({
132+
u'A': Timestamp('20130102', tz='US/Eastern'),
133+
u'B': Timestamp('20130603', tz='CET'),
134+
u'C': Timestamp('20130603', tz='UTC')}, index=range(5))
129135
)
130136

131137
with catch_warnings(record=True):

0 commit comments

Comments
 (0)