@mohanreddy7892
data.csv
Name, Age, Occupation, Country
John Doe, 28, Engineer, USA
Jane Smith, 34, Designer, UK
Alice Johnson, 29, Artist, Australia
Bob Brown, 22, Student, Canada
Charlie White, 31, Doctor, New Zealand
Diana Green, 40, Lawyer, India
Eve Black, 25, Photographer, France
Frank Gray, 37, Journalist, Germany
Grace Blue, 29, Architect, Italy
Henry Pink, 45, Chef, Spain
from python import Python
fn main() raises:
let pd = Python.import_module("pandas")
let csv_file = "/home/mohan/data.csv"
let excel_file = "/home/mohan/data.xlsx"
let df = pd.read_csv(csv_file)
print(df)
df.to_excel(excel_file, index=False, engine="openpyxl")
print("CSV has been converted to Excel!")
**But im getting Error :**
Unhandled exception caught during execution: An error occurred in Python.
mojo: error: execution exited with a non-zero result: 1