Oct-08-2018, 09:58 AM
Dear Python Experts,
I have some dates that I need to clearn up.
as well as a 19 to ahead of all 2 digits behind the last /.
In case of the second date, I would like to add a zero to all single digits before the first / and
a zero to all single digits behind the first /.
Can someone point me in the right direction which dataframe string manipulation function I should use?
I have some dates that I need to clearn up.
d = {'col1': ['1/25/84', '2/8/86'],} dfdates = pd.DataFrame(data=d) print(dfdates)For the first date, I want to add a zero to all single digits before the first /
as well as a 19 to ahead of all 2 digits behind the last /.
In case of the second date, I would like to add a zero to all single digits before the first / and
a zero to all single digits behind the first /.
Can someone point me in the right direction which dataframe string manipulation function I should use?