0
I need to create a Python list from a column of an Excel file using the pandas library. I have already installed all library components and the files are in the same directory.
from pandas import DataFrame
import pandas as pd
filename = r'email.xlsx'
df = pd.read_excel(filename)
email = list[df['EMAIL']]
print(email)
While running this file, an error is charged on line 7 of the program:
Traceback (Most recent call last): File "main.py", line 7, in email = list[df['EMAIL']] Typeerror: 'type' Object is not subscriptable
I’ve been through the library documentation, but I can’t seem to figure it out. Thank you! D
It worked!!!!!! Thank you very much! <3
– Gustavo Silva
@Gustavosilva Please read how to accept an answer
– danieltakeshi