Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pandas help, please
#1
Hi, I'm new to Python and the forum. I have a frustrating problem that I can't understand. I've installed the pandas package and whenever I try to run a program using pandas my output gets stuck in a loop that never ends.

I've written a program that imports pandas and does nothing else, I've named it "testfile.py"

I apologize if I didn't enter the code correctly.

 
import pandas as pd 


My output is below. When I run the program it asks me to enter a number but it never ends. Does anyone know why this is happening?

(pandas) timoshea81@iMac python % python3 testfile.py
Enter a number:
Reply
#2
This is odd and there must be something in your environment that's causing it. You don't happen to have a file called pandas.py that has code in that would do that, do you?
Reply
#3
You set me in the right direction. I had a program called "numbers.py" that I created. Pandas also imports "numbers.py" so it was trying to import my file instead of the correct one. I renamed the my file and now it's working. Thanks for your help!
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020