Apr-15-2020, 08:53 AM
Hello friends . How can I use the data I read from CSV with the help of classes? Can you help?
Assigning data read from CSV to class
|
Apr-15-2020, 08:53 AM
Hello friends . How can I use the data I read from CSV with the help of classes? Can you help?
Apr-15-2020, 02:24 PM
(This post was last modified: Apr-15-2020, 02:25 PM by UGuntupalli.)
@faruk61,
Your question is way too generic, do you have a class which you want to use to read the csv ? Why do you want to use classes in the first place ? import pandas as pd df = pd.read_csv(filepath) # where filepath represents the location of your csv file You can simply use pandas to read it as shown above
Apr-15-2020, 05:52 PM
Do you want to instantiate objects using data from the file?
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link Create MCV example Debug small programs |
|