Pandas df not working properly

Question:
i’m trying to run this code but it not not showing the necessary output.it is showing output 1

import pandas as pd

# Create a dictionary with sample data
data = {
    "Name": ["Alice", "Bob", "Charlie"],
    "Age": [25, 30, 22],
    "City": ["New York", "San Francisco", "Los Angeles"],
}

# Create a DataFrame from the dictionary
df = pd.DataFrame(data)

# Display the DataFrame
# Display the DataFrame
print(df.to_string(index=False))

in future, please link the minimal repl which reproduces the issue: repl1

4 Likes

works for me. what should the expected output be ?

It will be forming the table with the variables given in the code

replit only runs the entrypoint, which by default is main.py.