mardi 12 juillet 2022

How to create DataFrames with 9 and 14 elements random values comining from numbers, letters and special characters in Python Pandas?

I need to create 2 DataFrame in Python Pandas:

  1. DataFame with random 9-elements values (all combinations of numbers, letters and special characters) like below ("col1" as string data type) with 100 rows:

df1

col1
-----
123456789
1234M678x
_+3456P89
12345@78!
...
  1. DataFame with random 14-elements values (all combinations of numbers, letters and special characters) like below ("col2" as string data type) with 100 rows:

df2

col2
--------------
92345678900554
123@^678900554
12345678PPl554
8 3456$89005x4
...



Aucun commentaire:

Enregistrer un commentaire