vendredi 14 octobre 2022

Generate dataframe using Gauss law

I would like to generate a dataframe. In this dataframe, the column "Date" using the timestamp has to be randomly generated. I would like to generate it using the gauss-law. I know the function random.gauss() and I have this code :

from faker import Faker
import pandas as pd
import numpy as np
from datetime import timedelta

fake_parking = [
    {'Licence Plate':fake.license_plate(), 
     'Start_date':fake.date_time_between_dates(datetime_start='-2y', datetime_end='-1d'),
     'Duration':fake.time_delta(end_datetime='+30d')
    } for x in range(10000)]
df = pd.DataFrame(fake_parking)

Here, I generate random date and I would like that these dates are generated featuring the gauss-law




Aucun commentaire:

Enregistrer un commentaire