Skip to content

Commit f24b82c

Browse files
committed
Undo formatting
1 parent d069b05 commit f24b82c

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

doc/source/whatsnew/v0.21.0.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@ Conversion
405405
- Bug in ``IntervalIndex.is_non_overlapping_monotonic`` when intervals are closed on both sides and overlap at a point (:issue:`16560`)
406406
- Bug in :func:`Series.fillna` returns frame when ``inplace=True`` and ``value`` is dict (:issue:`16156`)
407407

408+
408409
Indexing
409410
^^^^^^^^
410411

pandas/core/tools/datetimes.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,6 @@ def _convert_listlike(arg, box, format, name=None, tz=tz):
365365
except ValueError:
366366
pass
367367

368-
369368
return arg
370369

371370
elif unit is not None:
@@ -385,13 +384,11 @@ def _convert_listlike(arg, box, format, name=None, tz=tz):
385384
raise TypeError('arg must be a string, datetime, list, tuple, '
386385
'1-d array, or Series')
387386

388-
389387
arg = _ensure_object(arg)
390388
require_iso8601 = False
391389

392390
if infer_datetime_format and format is None:
393-
format = _guess_datetime_format_for_array(arg,
394-
dayfirst=dayfirst)
391+
format = _guess_datetime_format_for_array(arg, dayfirst=dayfirst)
395392

396393
if format is not None:
397394
# There is a special fast-path for iso8601 formatted
@@ -418,8 +415,7 @@ def _convert_listlike(arg, box, format, name=None, tz=tz):
418415
# fallback
419416
if result is None:
420417
try:
421-
result = tslib.array_strptime(arg, format,
422-
exact=exact,
418+
result = tslib.array_strptime(arg, format, exact=exact,
423419
errors=errors)
424420
except tslib.OutOfBoundsDatetime:
425421
if errors == 'raise':
@@ -443,6 +439,7 @@ def _convert_listlike(arg, box, format, name=None, tz=tz):
443439
yearfirst=yearfirst,
444440
require_iso8601=require_iso8601
445441
)
442+
446443
if is_datetime64_dtype(result) and box:
447444
result = DatetimeIndex(result, tz=tz, name=name)
448445
return result

pandas/io/sql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ def _harmonize_columns(self, parse_dates=None):
821821
if (col_type is datetime or col_type is date or
822822
col_type is DatetimeTZDtype):
823823
if col_type is DatetimeTZDtype:
824-
# Convert SQL Datetime columns with tz to UTC
824+
# Convert tz-aware Datetime SQL columns to UTC
825825
self.frame[col_name] = _handle_date_column(df_col,
826826
utc=True)
827827
else:

0 commit comments

Comments
 (0)