input: Write a python function to extract the name, mass, and distance from the sun of planets from a Wikipedia table.
  assert extract_planet_data('https://en.wikipedia.org/wiki/List_of_gravitationally_rounded_objects_of_the_Solar_System') != []
  assert isinstance(extract_planet_data('https://en.wikipedia.org/wiki/List_of_gravitationally_rounded_objects_of_the_Solar_System')[0], dict)
  assert 'name' in extract_planet_data('https://en.wikipedia.org/wiki/List_of_gravitationally_rounded_objects_of_the_Solar_System')[0]
output: import requests
  import pandas as pd
  
  def extract_planet_data(url):
      response = requests.get(url)
      tables = pd.read_html(response.text)
      
      # Assuming the desired table is the first one
      planet_table = tables[0]
      
      planet_data = []
      for _, row in planet_table.iterrows():
          name = row['Name']
          mass = row['Mass (1021 kg)']
          distance = row['Distance from Sun (106 km)']
          
          planet_data.append({
              'name': name,
              'mass': mass,
              'distance': distance
          })
      
      return planet_data