Python Forum
how to remove index in df Row?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to remove index in df Row?
#4
(May-04-2018, 07:16 AM)issac_n Wrote: I wanted to remove index row, because it return index number 0,1,2,3.... by default

>>> x = pd.DataFrame({'x':[7,8,9], 'y':[4,5,6]})
>>> x
   x  y
0  7  4
1  8  5
2  9  6
So, do you want to remove 0, 1, 2 in the example above? If so, you need to know that pandas series and data frames always have an index...
Reply


Messages In This Thread
how to remove index in df Row? - by issac_n - Apr-26-2018, 07:14 AM
RE: how to remove index in df Row? - by scidam - Apr-27-2018, 07:40 AM
RE: how to remove index in df Row? - by issac_n - May-04-2018, 07:16 AM
RE: how to remove index in df Row? - by scidam - May-07-2018, 01:39 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [split] Getting Index Error - list index out of range krishna 2 2,658 Jan-09-2021, 08:29 AM
Last Post: buran
  Getting Index Error - list index out of range RahulSingh 2 6,202 Feb-03-2020, 07:17 AM
Last Post: RahulSingh

Forum Jump:

User Panel Messages

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