делая некоторые предположения, это код:
import pandas as pd
date_of_transaction = ['3/29/2019','06/07/2019','9/24/2019','11/15/2019','11/15/2019','11/15/2019']
a = pd.DataFrame(date_of_transaction, columns = ['date_of_transaction'])
a['entity_short_name'] = ['VGF','VGF','VGF','VGF','OTHER','OTHER']
a['tPricestock'] = [2.6,2.6,2.6,2.6,2.6,2.6]
#select the rows
VGF = a[a['entity_short_name']=='VGF']
#split data in month,day,year
VGF[['MM','DD','YYYY']] = VGF.date_of_transaction.apply(lambda x: pd.Series(str(x).split("/")))
#formata D to DD
for i in range(len(VGF['MM'])):
if len((VGF['MM'].iloc[i])) <2:
VGF['MM'].iloc[i] = '0'+VGF['MM'].iloc[i]
#format date the way you want
VGF['DATE'] = VGF['YYYY']+'-'+VGF['MM']+'-'+VGF['DD']
VGF['VGF'] = VGF['tPricestock']
VGF = VGF[['DATE','VGF']]
вывод:
Out[58]:
DATE VGF
0 2019-03-29 2.6
1 2019-06-07 2.6
2 2019-09-24 2.6
3 2019-11-15 2.6