I have to convert a column of dates from the integer/date format to the date format d-m-Y. Example:
import pandas as pd
col1 = [737346, 737346, 737346, 737346, 737059, 737346]
col2 = ['cod1', 'cod2', 'cod3', 'cod4', 'cod1', 'cod2']
dict = {'V1' : col1, 'V2' : col2}
df = pd.DataFrame.from_dict(dict)
df
V1 V2
0 737346 cod1
1 737346 cod2
2 737346 cod3
3 737346 cod4
4 737059 cod1
5 737346 cod2
expected:
df
V1 V2
0 14-10-2019 cod1
1 14-10-2019 cod2
2 14-10-2019 cod3
3 14-10-2019 cod4
4 31-12-2018 cod1
5 14-10-2019 cod2