added list conversion of pandas column using literal_eval

This commit is contained in:
Koushik R Kirugulige 2020-10-28 16:47:18 +05:30 committed by GitHub
parent a46b109f05
commit 9eb6b0bd49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,7 @@
import pandas as pd
import datetime
import logging
from ast import literal_eval
#yesterday gets yesterday's date in MMDDYYYY format and compare if that is a laliga matchday max date and proceed to get the prediction from 538 website
logging.basicConfig(filename="laliga.log",format='%(asctime)s %(message)s',filemode='a')
@ -88,7 +89,7 @@ else:
main_df = pd.merge(main_df,df,on='team')
main_df = main_df.rename(columns = {'Win League_x':'Win League','Win League_y':'new column'})
main_df['Win League'] = main_df['Win League'].apply(literal_eval)
main_df['Win League'] = main_df.apply(merge_col,axis = 1)