Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? RAG (Retrieval-Augmented Generation)
et Fine Tuning d'un LLM
Voir le programme détaillé
Classe « PeriodIndex »

Méthode pandas.PeriodIndex.to_timestamp

Signature de la méthode to_timestamp

def to_timestamp(self, freq=None, how: 'str' = 'start') -> 'DatetimeIndex' 

Description

help(PeriodIndex.to_timestamp)

Cast to DatetimeArray/Index.

Parameters
----------
freq : str or DateOffset, optional
    Target frequency. The default is 'D' for week or longer,
    's' otherwise.
how : {'s', 'e', 'start', 'end'}
    Whether to use the start or end of the time period being converted.

Returns
-------
DatetimeArray/Index

Examples
--------
>>> idx = pd.PeriodIndex(["2023-01", "2023-02", "2023-03"], freq="M")
>>> idx.to_timestamp()
DatetimeIndex(['2023-01-01', '2023-02-01', '2023-03-01'],
dtype='datetime64[ns]', freq='MS')


Vous êtes un professionnel et vous avez besoin d'une formation ? Coder avec une
Intelligence Artificielle
Voir le programme détaillé