Linked Questions

Popular Questions

Running bar chart race works for me with the code,

import bar_chart_race as bcr
bcr.bar_chart_race(df = df_tp, 
                   n_bars = 10, 
                   period_fmt='Gameweek {x:.0f}',
                   steps_per_period = 20,
                   title='my title',
                   filename = 'fpl.mp4',
                   interpolate_period = 'false'

but when I try to add {x:.0f + 1} it gives me the error:

Exception: You do not have ffmpeg installed on your machine. Download
                            ffmpeg from here:
                            Matplotlib's original error message below:

                            Invalid format specifier

I have installed ffmpeg so not sure why it happens. My problem is that I want to print out gameweeks and it prints out the index number instead, so it starts from 0 and ends 1 early. Is there a way to add +1 or for it to retrieve the value from my 'gameweek' column instead (which contains the correct numbers)?

Related Questions