Opening a csv file on SublimeText3

Does anybody know how to open a csv file on python on SublimeText3, I´m writing my code as shown below:

import pandas as pd

df = pd.read_csv(r’“C:\Users\Kevin Pancardo\Downloads\Diabetes database.csv”')

However, it show a message that says:

Traceback (most recent call last):
File “C:\Users\Kevin Pancardo\Downloads\”, line 1, in
import pandas as pd
ModuleNotFoundError: No module named ‘pandas’
[Finished in 356ms]

Could anybody help me with this error?

Another aspect I would like to clarify, my csv file has a table format on it, is it okay or it must not have any table format on the sheets? Maybe that´s the reason of my error. Thank you for your help:)

It seems like you have encountered two issues here.

First, the error message indicates that the pandas module is not installed. You need to install the pandas module before you can use it in your code. You can install pandas by running the following command in your terminal or command prompt:

pip install pandas

This command will download and install the pandas module and its dependencies.

Once you have installed pandas, you can then try running your code again.

Secondly, the format of your CSV file should not be an issue as long as it follows the standard CSV file format. A CSV file is a plain text file that uses commas to separate values. Each row in the file represents a record, and each value in the row is separated by a comma. If your file has a table format, it should be fine as long as it is saved as a CSV file and follows this format.

I hope this helps!

1 Like

Thank you very much bro, it worked!!!

1 Like