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
276 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

0 votes
0 answers

I am trying to execute the following python code:

and i get the folloeing error READ MORE

Aug 2 in Python by cinhaw
• 120 points
52 views
+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
175 views
0 votes
0 answers

I am trying to install PyBase64 on my python 3.8. But I end up with the following error:

$ pip install pybase ERROR: Could not find ...READ MORE

Mar 24 in Python by Nishant
• 210 points
349 views
0 votes
1 answer
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
305 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
4,121 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
1,396 views
0 votes
3 answers

i am installing wordcloud using pip but i am unable to do that ....i am getting the following error

Hi @ Prajwala  All the members here, I ...READ MORE

answered Sep 14 in Python by Richa sharma
2,221 views