input: Write a function to convert a given SQL statement into a Python Pandas DataFrame. The function should take a SQL query and a connection object as input, execute the SQL query, and return the resulting DataFrame. If the SQL query is invalid or the connection cannot execute the query, the function should raise an appropriate exception.
  
  import pandas as pd
  
  def sql_to_dataframe(sql_query, conn):
      try:
          df = pd.read_sql_query(sql_query, conn)
          return df
      except Exception as e:
          raise e
  
  assert sql_to_dataframe("SELECT * FROM book;", conn).equals(pd.read_sql_query("SELECT * FROM book;", conn))
  assert sql_to_dataframe("SELECT title, author FROM book;", conn).equals(pd.read_sql_query("SELECT title, author FROM book;", conn))
  assert sql_to_dataframe("SELECT * FROM invalid_table;", conn).equals(pd.read_sql_query("SELECT * FROM invalid_table;", conn))
output: def sql_to_dataframe(sql_query, conn):
      try:
          df = pd.read_sql_query(sql_query, conn)
          return df
      except Exception as e:
          raise e