jeudi 18 juin 2020

How can I generate a random day of the year in a specified year quarter with python?

Let's suppose in a pandas dataframe I have for a certain record:

x.index.quarter

is 3

I need to generate an integer from 1 to 365 as day of the year, that would belong to the same quarter.

How does pandas decide the year quarter? Is there a mathematical formula? Does it depends only on the months?




Aucun commentaire:

Enregistrer un commentaire