72 lines
1.3 KiB
Python
72 lines
1.3 KiB
Python
# nothing
|
|
from faker import Faker
|
|
from random import randint, random, choice
|
|
import pandas as pd
|
|
|
|
fake = Faker("pl_PL")
|
|
papiery = [
|
|
"PKOGS",
|
|
"PKOSO",
|
|
"RENTIERFIZ",
|
|
"PZUAKORD",
|
|
"PKOGD",
|
|
"INVGLDFIZ",
|
|
"PKOASZEWZ",
|
|
"INVFIZ",
|
|
"IPOBENE3A",
|
|
"INVCEEFIZ",
|
|
]
|
|
|
|
daty = [
|
|
"2025-03-01",
|
|
"2025-03-02",
|
|
"2025-03-03",
|
|
"2025-03-04",
|
|
"2025-03-05",
|
|
"2025-03-06",
|
|
"2025-03-07",
|
|
"2025-05-08",
|
|
"2025-05-09",
|
|
"2025-05-10",
|
|
"2025-05-11",
|
|
"2025-05-12",
|
|
"2025-04-13",
|
|
"2025-04-14",
|
|
"2025-04-15",
|
|
|
|
]
|
|
|
|
osoby = []
|
|
for _ in range(20):
|
|
osoby.append(fake.name())
|
|
|
|
elementy_dat = []
|
|
elementy_inst = []
|
|
elementy_osoba = []
|
|
elementy_ilosc = []
|
|
elementy_obrot = []
|
|
|
|
for _ in range(20000):
|
|
data = choice(daty)
|
|
instrument = choice(papiery)
|
|
osoba = choice(osoby)
|
|
ilosc = randint(100,2000)
|
|
obrot = ilosc * random()*1000
|
|
elementy_dat.append(data)
|
|
elementy_inst.append(instrument)
|
|
elementy_osoba.append(osoba)
|
|
elementy_ilosc.append(ilosc)
|
|
elementy_obrot.append(obrot)
|
|
|
|
|
|
|
|
bazowy_slownik_dla_df = {
|
|
"data": elementy_dat,
|
|
"osoba": elementy_osoba,
|
|
"instrument": elementy_inst,
|
|
"ilosc": elementy_ilosc,
|
|
"obrot": elementy_obrot,
|
|
}
|
|
|
|
df = pd.DataFrame(bazowy_slownik_dla_df)
|
|
df.to_excel("bazowy_slownik_dla_df_faker.xlsx") |