add random dates in 400K pandas dataframe
问题 Trying to append a fourth column to the following dataframe of length 465017 . 0 1 2 0 228055 231908 1 1 228056 228899 1 Running following syntax x["Fake_date"]= fake.date(pattern="%Y-%m-%d", end_datetime=None) returns 0 1 2 Fake_date 0 228055 231908 1 1980-10-12 1 228056 228899 1 1980-10-12 but I want different random dates on 465017 rows for an instance, 0 1 2 Fake_date 0 228055 231908 1 1980-10-11 1 228056 228899 1 1980-09-12 How do I randomize this? 回答1: Without the faker package, you can