title: Filter the data in Python Script Visual in power BI using Python
body: <p>I have created one basic python script visual in power bi and now I want to apply a filter to that visual using that script only. Below is the code I have written.</p>
  
  <pre><code> import pandas
   import matplotlib.pyplot as plt
   a=dataset.Test_name
   plt.bar(a,dataset.Value)
   plt.show()
  </code></pre>
  
  <p>The data set <code>Test_name</code> contains multiple rows and that's why my graphs are showing multiple bars. Now I only want to see the bar of the data present on the 1 st row or 3 rd row of the dataset <code>Test_name</code>.How can I achieve that in Power BI Python script visual.
  I have used the array functionalities but it causes problems while plotting the graph.</p>