0

I'm trying to import a CSV file of my choice (by selecting it) but in python's csv libraries I can't find a function that allows me to open a choice path without having to go through pyton's prompt. Has anyone managed to open a Windows window for file selection? Thx

PCM
  • 2,881
  • 2
  • 8
  • 30
  • first you want to have a window to select a file, you should use tkinter to be able to do that check here [https://stackoverflow.com/questions/3579568/choosing-a-file-in-python-with-simple-dialog] then use pandas to open it – Walid Bousseta Jun 24 '21 at 13:44

1 Answers1

2
import pandas as pd

file = pd.read_csv('path to your file', sep='your separator')