I cannot see paycharm community to install - can I install professional then swap to community?
I’d recommend going directly to the website for PyCharm community and download and install it directly from there.
will that be the one anaconda uses to Launch?
that worked thank you
I get this issue now.
C:\Users\user\anaconda3\python.exe “C:\Python progs\readcsvandxl.py”
Traceback (most recent call last):
File “C:\Python progs\readcsvandxl.py”, line 3, in
import xlsxwriter
ModuleNotFoundError: No module named ‘xlsxwriter’
import os
import pandas as pd
#import xlsxwriter
File names
csv_filename = “ANZ.csv”
excel_filename = “ANZ.xlsx”
Read the CSV file
csv_data = pd.read_csv(csv_filename)
Check if the Excel file exists
if os.path.exists(excel_filename):
# Read the existing Excel file
excel_data = pd.read_excel(excel_filename)
# Compare the two dataframes
# Identify rows in the CSV that are not in the Excel file
new_rows = csv_data[~csv_data.apply(tuple,1).isin(excel_data.apply(tuple,1))]
if not new_rows.empty:
# If there are new rows, append them to the Excel file
with pd.ExcelWriter(excel_filename, mode='a', if_sheet_exists='overlay', engine='openpyxl') as writer:
new_rows.to_excel(writer, index=False, header=False, startrow=len(excel_data)+1)
print("Added new rows to the existing Excel file.")
else:
print("No new rows to add.")
else:
# If the Excel file doesn’t exist, create it with the data from the CSV
with pd.ExcelWriter(excel_filename, engine=‘xlsxwriter’) as writer:
csv_data.to_excel(writer, index=False)
print(f"Created new Excel file ‘{excel_filename}’ with data from CSV.")
Printing the first 5 rows of the CSV data
print(‘\nFirst 5 rows of the CSV data:\n’)
print(csv_data.head())
do you have xlsxwriter installed into your environment?
if not, you can use Navigator or conda in a terminal to install it.