pandas.TimedeltaIndex.to_frame

pandas 3.1.1 · Index objects · method

Turn a one-dimensional pandas object into a DataFrame.

Call syntax

TimedeltaIndex.to_frame(index=True, name=…)

Run the example

Edit the example and select Run Python to see the result.

Parameters

ParameterRequirementAccepted values and behavior
index Optional
Positional or keyword
Default True
bool

Supply row labels or control how existing row labels are used.

name Optional
Positional or keyword
Hashable

Set a name or identify the named object used by the operation.

Returns

DataFrame