Skip to content

Commit 6989ce3

Browse files
shippyHaukeBartsch
authored andcommitted
Move pandas bug documentation to the pandas issue
pandas-dev/pandas#20511
1 parent 42b47e9 commit 6989ce3

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

report_export_properties.py

+2-10
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,8 @@ def export_info_to_columns(token):
5858
all_info.loc[:, col] = (
5959
pd.to_datetime(all_info.loc[:, col], utc=True)
6060
.dt.tz_convert('US/Pacific'))
61-
## Why a loop, you might ask?
62-
##
63-
## The following doesn't work due to a bug in pandas:
64-
## https://github.com/pandas-dev/pandas/issues/20511
65-
# all_info.loc[:, datelike_cols] = all_info.loc[:, datelike_cols].apply(
66-
# pd.to_datetime)
67-
# all_info.loc[:, col] = pd.to_datetime(all_info.loc[:, col]).dt.tz_localize('GMT')
68-
# all_info.loc[:, [col]] = pd.to_datetime(all_info[:, [col]])
69-
# all_info.loc[:, col] = all_info.loc[:, col].apply(pd.to_datetime)
70-
# all_info.loc[:, col] = all_info.loc[:, [col]].apply(pd.to_datetime)
61+
# Loop, because there's a bug in pandas for slice assignment:
62+
# https://github.com/pandas-dev/pandas/issues/20511
7163

7264
all_info.sort_values('ProcessingCompleted', inplace=True)
7365
all_info.to_csv(args.outfile)

0 commit comments

Comments
 (0)