MCPcopy
hub / github.com/pandas-dev/pandas / f

Method f

pandas/io/pytables.py:2998–3006  ·  view source on GitHub ↗
(values, freq=None, tz=None)

Source from the content-addressed store, hash-verified

2996 if index_class == DatetimeIndex:
2997
2998 def f(values, freq=None, tz=None):
2999 # data are already in UTC, localize and convert if tz present
3000 dta = DatetimeArray._simple_new(
3001 values.values, dtype=values.dtype, freq=freq
3002 )
3003 result = DatetimeIndex._simple_new(dta, name=None)
3004 if tz is not None:
3005 result = result.tz_localize("UTC").tz_convert(tz)
3006 return result
3007
3008 factory = f
3009 elif index_class == PeriodIndex:

Callers

nothing calls this directly

Calls 4

PeriodDtypeClass · 0.90
_simple_newMethod · 0.45
tz_convertMethod · 0.45
tz_localizeMethod · 0.45

Tested by

no test coverage detected