I'm trying to graph how much each key in the keyboard is used, classifying by side of the keyboard.
For that I get a long string of text, I count the values for each letter and then make it into a pandas.DataFrame().
The DataFrame has this structure
kp e 12.534045 a 12.167107 o 9.238939 s 7.103866 n 6.470274 I'm plotting with
# Lazy definition of left_side and right_side of the keyboard left_side = [l for l in 'qwertasdfgzxcvb'] right_side = [l for l in 'yuiophjklñnm,.-'] # Plot the graph df.plot( kind = 'bar', figsize = (10,5), color = ['r' if letter in left_side else 'b' for letter in df.index] ) But this makes a plot with all red bars. I've checked and the generated list with list comprehension is actually how it should be (a list of 'r's and 'b's according to their location in the keyboard).
Any idea of what is going on here?

