回答編集履歴
1
Update
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
それぞれのカラムに、数字以外の文字が含まれています。
|
1
|
+
それぞれのカラムに、数字以外の文字が含まれています。例えば、
|
2
2
|
|
3
3
|
```python
|
4
4
|
>>> print(df_data_normal['面積(㎡)'].unique())
|
@@ -30,13 +30,16 @@
|
|
30
30
|
'元年': '0', '年': '', r'(\d+)': r'\1'
|
31
31
|
}, regex=True).str.split('@', expand=True).dropna(how='any').astype(int).sum(axis=1)
|
32
32
|
|
33
|
+
condition = (
|
33
|
-
#中古マンション等のみ
|
34
|
+
# 中古マンション等のみ
|
34
|
-
|
35
|
+
(df_data_normal['種類'] == '中古マンション等') &
|
35
|
-
#面積(㎡)⇒120以内
|
36
|
+
# 面積(㎡)⇒120以内
|
36
|
-
|
37
|
+
(df_data_normal['面積(㎡)'] <= 120) &
|
38
|
+
# 最寄駅:距離(分)⇒30以内
|
37
|
-
|
39
|
+
(df_data_normal['最寄駅:距離(分)'] <= 30) &
|
40
|
+
# 建築年(西暦) ⇒1950年以降
|
38
|
-
|
41
|
+
(df_data_normal['建築年(西暦)'] >= 1950))
|
39
42
|
|
43
|
+
df_data_normal = df_data_normal[condition]
|
40
44
|
print(df_data_normal)
|
41
45
|
```
|
42
|
-
|