I have a dataframe like this:
data = [['value', 'Jan'], ['value', 'Feb'], ['value', 'Mar'], ['value', 'Apr'], ['value', 'Mag'], ['value', 'Jun']]
df = pd.DataFrame(data, columns=['value', 'month'])
From the dataframe above I want to create a list of dictionaries exactly like this:
custom_labels = [
{'value': 'Jan'},
{'value': 'Feb'},
{'value': 'Mar'},
{'value': 'Apr'},
{'value': 'May'},
{'value': 'Jun'},]
I need this list of dictionaries beacuse i need to pass the categories of data labels to a scatter plot from a data contained in a dataframe (custom data labels peculiarity of xlxswriter)
Link to custom data labels