python newbie here. I am trying to create a df where 1 column is a month 'YYYY-MM' which I have created in a dict below (tips on generating this using code would be appreciated). I am stuck trying to get the weekdays column populated using the month_list.
import pandas as pd
df = pd.DataFrame({'month_list':['2019-01', '2019-02', '2019-03', '2019-04']})
df['weekdays'] = ''
I tried this code, but this only works for correctly for the first row. (i understand why this is, i just don't know the best way to complete each row correctly)
df.weekdays = np.busday_count(month_list[0], month_list[0+1])
df