How to import a csv via Python Notebook
I have searched your forum and only come up with ways to export a csv (or import to your public data community).
What I would like to do is import a list of customers and dates that I could then join on using another DataFrame. Is this possible to do?
I could just blindly attempt to use the csv module, but I wouldn't know essentially where I am on my local machine in order to source the file. Thanks!
When doing data science in Python, you may be asked to analyse the data that’s in CSV or Excel file. You need to be able to read this file into Python. Using pandas will help you to automatically convert it into a DataFrame.
Today, I am going to show you how to both import and export CSV files. If you have looked at any of my previous blog posts on my GitHub account, you saw that I already regularly import files into my IPython notebooks.
Checkout this link there is a detailed explanation: https://medium.com/@kasiarachuta/importing-and-exporting-csv-files-in-python-7fa6e4d9f408Reply