質問編集履歴
3
試したことの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,7 +2,15 @@
|
|
2
2
|
|
3
3
|
解決方法をご教授ください。
|
4
4
|
|
5
|
+
・使用PC:Macです。
|
6
|
+
|
7
|
+
・行ったこと:
|
8
|
+
|
5
|
-
|
9
|
+
違うPCで起動(win10⇨正常動作)
|
10
|
+
|
11
|
+
pandas,NUMEXP,アナコンダの再インストール
|
12
|
+
|
13
|
+
win10とのpandasのバージョン確認⇨同一Ver
|
6
14
|
|
7
15
|
```pyhton
|
8
16
|
|
2
前提条件の部分のコードを追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -5,6 +5,54 @@
|
|
5
5
|
使用PCはMacです。(同じコードをwindows上で回した際には正常に動きました)
|
6
6
|
|
7
7
|
```pyhton
|
8
|
+
|
9
|
+
# pipでオリジナルの解答に必要なライブラリーをインストール
|
10
|
+
|
11
|
+
!pip install --upgrade pip
|
12
|
+
|
13
|
+
!pip install -U pandas numpy scikit-learn imbalanced-learn
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
# pipでオリジナルの解答に必要なライブラリーをインポート
|
18
|
+
|
19
|
+
import os
|
20
|
+
|
21
|
+
import pandas as pd
|
22
|
+
|
23
|
+
import numpy as np
|
24
|
+
|
25
|
+
from datetime import datetime, date
|
26
|
+
|
27
|
+
from dateutil.relativedelta import relativedelta
|
28
|
+
|
29
|
+
import math
|
30
|
+
|
31
|
+
from sklearn import preprocessing
|
32
|
+
|
33
|
+
from sklearn.model_selection import train_test_split
|
34
|
+
|
35
|
+
from imblearn.under_sampling import RandomUnderSampler
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
# データを github/noguhiro2002/100knocks-preprocess/work/data フォルダよりDataframe形式でRead
|
42
|
+
|
43
|
+
df_customer = pd.read_csv('https://raw.githubusercontent.com/The-Japan-DataScientist-Society/100knocks-preprocess/master/docker/work/data/customer.csv')
|
44
|
+
|
45
|
+
df_category = pd.read_csv('https://raw.githubusercontent.com/The-Japan-DataScientist-Society/100knocks-preprocess/master/docker/work/data/category.csv')
|
46
|
+
|
47
|
+
df_product = pd.read_csv('https://raw.githubusercontent.com/The-Japan-DataScientist-Society/100knocks-preprocess/master/docker/work/data/product.csv')
|
48
|
+
|
49
|
+
df_receipt = pd.read_csv('https://raw.githubusercontent.com/The-Japan-DataScientist-Society/100knocks-preprocess/master/docker/work/data/receipt.csv')
|
50
|
+
|
51
|
+
df_store = pd.read_csv('https://raw.githubusercontent.com/The-Japan-DataScientist-Society/100knocks-preprocess/master/docker/work/data/store.csv')
|
52
|
+
|
53
|
+
df_geocode = pd.read_csv('https://raw.githubusercontent.com/noguhiro2002/100knocks-preprocess_ForColab-AzureNotebook/master/data/geocode.csv')
|
54
|
+
|
55
|
+
|
8
56
|
|
9
57
|
df_sales_amount = df_receipt.query('not customer_id.str.startswith("Z")', engine='python')
|
10
58
|
|
1
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
queryメソッドでのエラー
|
1
|
+
python pandas queryメソッドでのエラー
|
test
CHANGED
File without changes
|