I am trying to print each entry of the dataframe separately. The dataframe is created by the following code

0 votes
import pandas as pd

XYZ_web = {'Day':[1,2,3,4,5,6], 'Visitors':[1000,700,6000,1000,400,350], 'Bounce_Rate':[20,20,23,15,10,34]}

df = pd.DataFrame(XYZ_web)

print(df)

but i am getting this error:

Traceback (most recent call last):
  File "C:/Users/HP/AppData/Local/Programs/Python/Python37/testpandas.py", line 1, in <module>
    import pandas as pd
  File "C:/Users/HP/AppData/Local/Programs/Python/Python37\pandas.py", line 5, in <module>
    df = pd.DataFrame(XYZ_web)
AttributeError: module 'pandas' has no attribute 'DataFrame'
Jan 27 in Python by solo
• 120 points
169 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Python

+1 vote
1 answer
0 votes
0 answers

I am trying to click the button but it is not working and it is drop list ..

<a class="quickreports btn btn3d tbbtn" href="javascript:" style="position:static" ...READ MORE

Dec 1, 2019 in Python by anonymous
• 120 points
111 views
0 votes
1 answer

How to print all the index of Pandas Dataframe?

Try this: print(df.index.values) READ MORE

answered Apr 8, 2019 in Python by Yogi
65 views
0 votes
1 answer

How to print the index of a Pandas Dataframe?

You can do this using the code ...READ MORE

answered May 12, 2019 in Python by Usha
139 views
0 votes
1 answer

Is it possible to find the source code of built-in functions of Python?

Since Python is open source you can ...READ MORE

answered Jul 17, 2019 in Python by Neel
• 3,010 points
55 views
+1 vote
1 answer

How to print first character of each word in upper case of a string in Python

You can use split() using space as ...READ MORE

answered Jun 1, 2018 in Python by george
• 200 points
3,324 views
0 votes
1 answer

Is arr.__len__() the preferred way to get the length of an array in Python?

my_list = [1,2,3,4,5,6,7] len(my_list) # 7 The same works for ...READ MORE

answered Oct 8, 2018 in Python by SDeb
• 13,230 points
114 views
0 votes
1 answer

How to print a message or the error if a file is not found?

To print the message that file is not ...READ MORE

answered Jan 2, 2019 in Python by Omkar
• 68,940 points
60 views
0 votes
1 answer

What is the recommended way to randomize a list of strings using Python?

Hi. Nice question. Here is the simplified answer ...READ MORE

answered Jan 18, 2019 in Python by Nymeria
• 3,540 points
74 views