So I need to make a program that reads an excel file and auto makes some comparative graphs with the columns the user choose, but I'm stuck on the list part, how can I make the user choose from the list of columns and make pandas recognize the user input choices? Is there any function or library to make this easier for me?
This is my code for now:
import pandas as pd
import os
import sys
def choose_file():
global filepath
filepath = input('Enter filepath: ')
assert os.path.exists(filepath), "I did not find the file at, " + str(filepath) #checks if file exists
f = open(filepath, 'r+')
print("We found your file.")
f.close()
def open_file():
global archive
archive = pd.read_csv(filepath, encoding='latin1') #pandas dataframe
print(archive)
def choose_columns():
print(archive.columns)
#I'm stuck here and I don't know what to do