title: not able to pass parameter to function in python
body: <p>How to convert below python code into function , so that when i call and pass parameter the function process and run</p>
  <p><strong>Python code :</strong></p>
  <pre><code>import pandas as pd
  data_xls = pd.read_excel('/demo/ab/excelfile.xlsx', 'Sheet1', dtype=str, index_col=None)
  data_xls.to_csv('csvfile.csv', encoding='utf-8', index=False)
  </code></pre>
  <p>I need like below :</p>
  <pre><code>def pyconv(function):
      var=path
      fname=filename
      import pandas as pd
      data_xls = pd.read_excel('var', 'fname', dtype=str, index_col=None)
      data_xls.to_csv('csvfile.csv', encoding='utf-8', index=False)
  </code></pre>
  <p><strong>when i call function and pass parameter it should run :</strong></p>
  <pre><code>pycon(path,filename)
  </code></pre>
  <p>my function will take <code>var value : '/demo/ab/excelfile.xlsx' and fname=sheet1</code></p>
  <pre><code>pycon('/demo/ab/excelfile.xlsx','sheet1')
  </code></pre>