I am trying to import a csv file from my desktop to my jupyter notebook and then open and read it. I made sure to save the csv file in the same folder as the ipynb file.
here is the code I've used so far:
%matplotlib inline
import csv
import matplotlib.pyplot as plt
import os
userhome = os.path.expanduser('~')
csvfile= userhome + r'/Desktop/Software/evil_corp.csv'
open(csvfile, "r")
and this is the response I'm getting:
<_io.TextIOWrapper name='/Users/jessicanicholson/Desktop/Software/evil_corp.csv' mode='r' encoding='UTF-8'>
how do i proceed from here? I thought the last request would open/ view the file.
openreturns a file descriptor.