Translate the following SQL query into Python code.
SELECT Customer_Name, COUNT(Order_Id) AS Number_of_Orders 
FROM Orders 
GROUP BY Customer_Name
import pandas as pd

df = pd.read_sql_query("SELECT Customer_Name, COUNT(Order_Id) AS Number_of_Orders FROM Orders GROUP BY Customer_Name", con)
result = df.to_dict('records')