How To Import a CSV File to Pycharm

Whether the CSV file is on your computer or online

Sabit
Analytics Vidhya

--

Photo by Brett Jordan on Unsplash

Knowing how to import and read a CSV file in Pycharm is a big plus. You save time; you work faster; and your work remains compact, among other benefits.

Pycharm itself is a robust tool. If you are not persistent, you get tired of it easily — while trying to import a CSV file or do other things.

Below, I explained how you could import a CSV file on your computer or online to Pycharm. And how you can add the file permanently to your Pycharm directory.

Note: install pandas first if not already installed.

How to Import a CSV File in Pycharm

  • Find the CSV file path you want to import or read in Pycharm. To find the CSV file on your computer, type the filename in the “Type here to search” taskbar in windows. Find that at the bottom left of your computer screen.
  • Filename(s) will pop up. Right-click on the file you want and click “Copy full path”. Or click the arrow-head shape in front of the file you want and click “Copy full path”.
  • Open Pycharm and write the below three-line code:

--

--