Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #108605 > unrolled thread
| Started by | Michael Selik <michael.selik@gmail.com> |
|---|---|
| First post | 2016-05-13 16:56 +0000 |
| Last post | 2016-05-13 16:56 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: How to put back a number-based index Michael Selik <michael.selik@gmail.com> - 2016-05-13 16:56 +0000
| From | Michael Selik <michael.selik@gmail.com> |
|---|---|
| Date | 2016-05-13 16:56 +0000 |
| Subject | Re: How to put back a number-based index |
| Message-ID | <mailman.635.1463158627.32212.python-list@python.org> |
On Fri, May 13, 2016 at 12:27 PM David Shi via Python-list < python-list@python.org> wrote: > I lost my indexes after grouping in Pandas. > I managed to rest_index and got back the index column. > But How can I get back a index row? > Was the grouping an aggregation? If so, the original indexes are meaningless. What you could do is reset_index before the grouping and when you aggregate decide how to handle the formerly-known-as-index column (min, max, mean, ?).
Back to top | Article view | comp.lang.python
csiph-web