title: Horizontal barplot in seaborn with numeric independent data
body: <p>This is the <a href="https://seaborn.pydata.org/examples/horizontal_barplot.html" rel="nofollow noreferrer">Seaborn Doc on how to make a horizontal boxplot.</a>  You'll notice that they use some dataset called crashes and are graphing some categorical variable vs some numeric variable.  To make it horizontal, they are just flipping the x and y variable, easy enough.</p>
  <p>My issue is that my categories are numeric which causes problems.  A minimum reproducible example uses their dataset.  Basically this should be the same graph one horizontal and the other vertical.  As you can see they are both vertical...</p>
  <pre><code>import seaborn as sns
  import matplotlib.pyplot as plt
  sns.set(style=&quot;whitegrid&quot;)
  
  
  crashes = sns.load_dataset(&quot;car_crashes&quot;).sort_values(&quot;total&quot;, ascending=False)
  
  crashes['roundTotal'] = np.round(crashes['total']).astype(int)
  crashesMod = crashes.groupby(['roundTotal']).count().reset_index()
  crashesMod['VsAverage'] = crashesMod['total'] &gt; crashesMod.total.mean()
  
  sns.barplot(x = 'roundTotal', y = 'total', hue = 'VsAverage', data = crashesMod)
  plt.show()
  sns.barplot(y = 'roundTotal', x = 'total', hue = 'VsAverage', data = crashesMod)
  </code></pre>
  <p><a href="https://i.stack.imgur.com/VlqsQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VlqsQ.png" alt="enter image description here" /></a></p>
  <p>I tried making the column 'roundTotal' of type string as I imagined that it was doing some guessing under the hood and was failing with the 2 numeric types, but then I run into
  <code>TypeError: unsupported operand type(s) for /: 'str' and 'int'</code></p>