pandas 1.4.2

NotesParametersReturnsBackRef
_stata_elapsed_date_to_datetime_vec(dates, fmt) -> 'Series'

Notes

datetime/c - tc

milliseconds since 01jan1960 00:00:00.000, assuming 86,400 s/day

datetime/C - tC - NOT IMPLEMENTED

milliseconds since 01jan1960 00:00:00.000, adjusted for leap seconds

date - td

days since 01jan1960 (01jan1960 = 0)

weekly date - tw

weeks since 1960w1 This assumes 52 weeks in a year, then adds 7 * remainder of the weeks. The datetime value is the start of the week in terms of days in the year, not ISO calendar weeks.

monthly date - tm

months since 1960m1

quarterly date - tq

quarters since 1960q1

half-yearly date - th

half-years since 1960h1 yearly

date - ty

years since 0000

Parameters

dates : Series

The Stata Internal Format date to convert to datetime according to fmt

fmt : str

The format to convert to. Can be, tc, td, tw, tm, tq, th, ty Returns

Returns

converted : Series

The converted dates

Convert from SIF to datetime. https://www.stata.com/help.cgi?datetime

Examples

This example is valid syntax, but we were not able to check execution
>>> dates = pd.Series([52])
... _stata_elapsed_date_to_datetime_vec(dates , "%tw") 0 1961-01-01 dtype: datetime64[ns]
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

pandas.io.stata._stata_elapsed_date_to_datetime_vec

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /pandas/io/stata.py#223
type: <class 'function'>
Commit: