回答編集履歴
4
d
test
CHANGED
@@ -110,24 +110,26 @@
|
|
110
110
|
|
111
111
|
positions["area"] = positions.apply(find_area, axis=1, area=area)
|
112
112
|
|
113
|
-
positions
|
113
|
+
positions = positions.explode("area")
|
114
|
-
|
115
|
-
```
|
116
114
|
|
117
115
|
|
118
116
|
|
119
|
-
|
117
|
+
print(positions)
|
120
118
|
|
121
|
-
|
119
|
+
# x y area
|
122
120
|
|
123
|
-
0
|
121
|
+
# 0 556 250 a
|
124
122
|
|
125
|
-
|
123
|
+
# 0 556 250 d
|
126
124
|
|
127
|
-
2
|
125
|
+
# 1 556 255 a
|
128
126
|
|
129
|
-
|
127
|
+
# 1 556 255 d
|
130
128
|
|
129
|
+
# 2 451 507 NaN
|
130
|
+
|
131
|
+
# 3 449 507 NaN
|
132
|
+
|
131
|
-
4
|
133
|
+
# 4 443 506 NaN
|
132
134
|
|
133
135
|
```
|
3
d
test
CHANGED
@@ -102,12 +102,6 @@
|
|
102
102
|
|
103
103
|
|
104
104
|
|
105
|
-
if area_id.empty:
|
106
|
-
|
107
|
-
return [] # 点 point が含まれる領域が1つもない場合
|
108
|
-
|
109
|
-
|
110
|
-
|
111
105
|
return list(area_id)
|
112
106
|
|
113
107
|
|
2
d
test
CHANGED
@@ -108,7 +108,7 @@
|
|
108
108
|
|
109
109
|
|
110
110
|
|
111
|
-
return list(area_id)
|
111
|
+
return list(area_id)
|
112
112
|
|
113
113
|
|
114
114
|
|
1
d
test
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
and y >= 左上の y 座標
|
12
12
|
|
13
|
-
and y <=
|
13
|
+
and y <= 右下の y 座標
|
14
14
|
|
15
15
|
```
|
16
16
|
|