Reputation: 125
I'm trying to read an excel file using pandas in a views method.
But the server stopped with:
File "/Users/ronsair/anaconda3/lib/python3.6/site-packages/py/_error.py", line 44, in __getattr__
raise AttributeError(name)
AttributeError: __name__
Code:
import pandas as pd
def extract(request):
df = pd.read_excel('update.xlsx')
return render(request, "work/index.html")
Can you help please?
Upvotes: 0
Views: 537