title: Run a Python script to connect to PowerBI Services
body: <p><strong>Hi, I'm trying to run a Python script to connect to PowerBI Services.
  However, I am getting the error below:</strong></p>
  <pre><code>import pandas as pd
  import adodbapi as ado
  import numpy as np
  model_name = 'LATAM Daily Executive Performance Tracking'
  workspace = 'powerbi://api.powerbi.com/v1.0/myorg/Finance Latam CoE'
  connection_string = f'Provider=MSOLAP;Data Source={workspace};initial catalog={model_name}'
  model_name = 'LATAM Daily Executive Performance Tracking'
  workspace = 'powerbi://api.powerbi.com/v1.0/myorg/Finance Latam CoE'
  connection_string = f'Provider=MSOLAP;Data Source={workspace};initial catalog={model_name}'
  
  dax_query = &quot;&quot;&quot;
  EVALUATE Calendar
  &quot;&quot;&quot;
  
  def generate_df(pbi_data):
  ar = np.array(data.ado_results) # turn ado results into a numpy array
  df = pd.DataFrame(ar).transpose() # create a dataframe from the array
  df.columns = data.columnNames.keys() # set column names
  return df
  
  with ado.connect(connection_string) as con:
  with con.cursor() as cur:
      cur.execute(dax_query)
      data = cur.fetchall()
      df = generate_df(pbi_data = data)
      
  print(df)
  </code></pre>
  <p>This is the error I'm getting when I run this script.</p>
  <pre><code>error: (-2147352567, 'Exception occurred.', (0, 'ADODB.Connection', 'Provider cannot be found. 
  It may not be properly installed.', 'C:\\WINDOWS\\HELP\\ADO270.CHM', 1240655, -2146824582), None)
  
  OperationalError: (com_error(-2147352567, 'Exception occurred.', (0, 'ADODB.Connection', 
  'Provider cannot be found. It may not be properly installed.', 
  'C:\\WINDOWS\\HELP\\ADO270.CHM', 1240655, -2146824582), None), 'Error opening connection to 
  &quot;Provider=MSOLAP;Data Source=powerbi://api.powerbi.com/v1.0/myorg/Finance Latam CoE;initial 
  catalog=LATAM Daily Executive Performance Tracking&quot;')
  </code></pre>