回答編集履歴
1
Update
test
CHANGED
@@ -2,3 +2,13 @@
|
|
2
2
|
```python
|
3
3
|
df4 = df3.sort_values('Group', key=lambda x: x.replace('グループ', '', regex=True).astype(int))
|
4
4
|
```
|
5
|
+
|
6
|
+
**追記**
|
7
|
+
|
8
|
+
※ 以下は一時的にインデックスの名前を変更して `TotalPrice` でソートする方法です
|
9
|
+
```python
|
10
|
+
df4 = (
|
11
|
+
df3.rename_axis(index=df3.index.name + '__')
|
12
|
+
.sort_values('TotalPrice', ascending=False)
|
13
|
+
.rename_axis(index=df3.index.name))
|
14
|
+
```
|