@@ -83,9 +83,9 @@ in some cases:
83
83
- ` name ` could only be ` None ` ;
84
84
- ` start ` could only be ` 0 ` , ` step ` ` 1 ` ;
85
85
- when appending a `` NoRowIndex `` , the result would still be `` NoRowIndex `` ;
86
- - when slicing, one would still get a ` NoIndex ` ;
86
+ - when slicing, one would still get a ` NoRowIndex ` ;
87
87
- it could only be aligned with another `` Index `` if it's also `` NoRowIndex `` and if it's of the same length;
88
- - `` DataFrame `` columns can't be ` NoRowIndex ` (so `` transpose `` would need some adjustments when called on a `` NoIndex `` `` DataFrame `` );
88
+ - `` DataFrame `` columns can't be ` NoRowIndex ` (so `` transpose `` would need some adjustments when called on a `` NoRowIndex `` `` DataFrame `` );
89
89
- ` insert ` and ` delete ` should raise. As a consequence, if `` df `` is a `` DataFrame `` with a
90
90
`` NoRowIndex `` , then ` df.drop ` with ` axis=0 ` would always raise;
91
91
- arithmetic operations (e.g. ` NoRowIndex(3) + 2 ` ) would always raise.
@@ -186,11 +186,10 @@ One issue that arises, then, is what to do about ``transpose``, which would swap
186
186
index and columns. Rather than making `` transpose `` break, it could be more
187
187
user-friendly to, within `` transpose `` change a `` NoRowIndex `` index to a
188
188
`` RangeIndex `` of the same length before swapping index and columns.
189
- Note that calling `` transpose `` twice would no longer round-trip.
190
189
191
190
### DataFrameFormatter and SeriesFormatter changes
192
191
193
- When printing an object with a `` NoIndex `` , then the row labels wouldn't be shown:
192
+ When printing an object with a `` NoRowIndex `` , then the row labels wouldn't be shown:
194
193
195
194
``` python
196
195
In [15 ]: df = pd.DataFrame({' a' : [1 , 2 , 3 ], ' b' : [4 , 5 , 6 ]}, index = NoRowIndex(3 ))
@@ -228,8 +227,9 @@ Draft pull request showing proof of concept: https://github.com/pandas-dev/panda
228
227
229
228
** A:** Yes! And they're also confusing to many users, even experienced developers.
230
229
It's fairly common to see pandas code with `` .reset_index `` scattered around every
231
- other line. Such users would benefit from a mode in which they wouldn't need to think
232
- about indices and alignment.
230
+ other line. Such users would benefit from being able to not think about indices
231
+ and alignment. Indices would be here to stay, and `` NoRowIndex `` would not be the
232
+ default.
233
233
234
234
** Q: In this mode, could users still get an `` Index `` if they really wanted to?**
235
235
@@ -242,8 +242,6 @@ Draft pull request showing proof of concept: https://github.com/pandas-dev/panda
242
242
df.reset_index().set_index(' index' )
243
243
```
244
244
245
- ** Q: Why can't a DataFrame columns be `` NoRowIndex `` ?**
246
-
247
245
248
246
## PDEP History
249
247
0 commit comments