rosacastillo
commited on
Commit
·
ac98a26
1
Parent(s):
03219e6
notebook about market analysis
Browse files- notebooks/markets_analysis.ipynb +138 -30
notebooks/markets_analysis.ipynb
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
"cells": [
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
-
"execution_count":
|
6 |
"metadata": {},
|
7 |
"outputs": [],
|
8 |
"source": [
|
@@ -15,16 +15,16 @@
|
|
15 |
},
|
16 |
{
|
17 |
"cell_type": "code",
|
18 |
-
"execution_count":
|
19 |
"metadata": {},
|
20 |
"outputs": [],
|
21 |
"source": [
|
22 |
-
"fpmms = pd.read_parquet('../data/
|
23 |
]
|
24 |
},
|
25 |
{
|
26 |
"cell_type": "code",
|
27 |
-
"execution_count":
|
28 |
"metadata": {},
|
29 |
"outputs": [
|
30 |
{
|
@@ -48,63 +48,69 @@
|
|
48 |
" <thead>\n",
|
49 |
" <tr style=\"text-align: right;\">\n",
|
50 |
" <th></th>\n",
|
51 |
-
" <th>id</th>\n",
|
52 |
" <th>currentAnswer</th>\n",
|
|
|
53 |
" <th>title</th>\n",
|
|
|
54 |
" </tr>\n",
|
55 |
" </thead>\n",
|
56 |
" <tbody>\n",
|
57 |
" <tr>\n",
|
58 |
" <th>0</th>\n",
|
59 |
-
" <td>0x0020d13c89140b47e10db54cbd53852b90bc1391</td>\n",
|
60 |
" <td>No</td>\n",
|
61 |
-
" <td>
|
|
|
|
|
62 |
" </tr>\n",
|
63 |
" <tr>\n",
|
64 |
" <th>1</th>\n",
|
65 |
-
" <td>0x003ae5e007cc38b3f86b0ed7c82f938a1285ac07</td>\n",
|
66 |
" <td>No</td>\n",
|
67 |
-
" <td>
|
|
|
|
|
68 |
" </tr>\n",
|
69 |
" <tr>\n",
|
70 |
" <th>2</th>\n",
|
71 |
-
" <td>
|
72 |
-
" <td>
|
73 |
-
" <td>Will the
|
|
|
74 |
" </tr>\n",
|
75 |
" <tr>\n",
|
76 |
" <th>3</th>\n",
|
77 |
-
" <td>0x005e3f7a90585acbec807425a750fbba1d0c2b5c</td>\n",
|
78 |
" <td>Yes</td>\n",
|
79 |
-
" <td>
|
|
|
|
|
80 |
" </tr>\n",
|
81 |
" <tr>\n",
|
82 |
" <th>4</th>\n",
|
83 |
-
" <td>
|
84 |
-
" <td>
|
85 |
-
" <td>Will
|
|
|
86 |
" </tr>\n",
|
87 |
" </tbody>\n",
|
88 |
"</table>\n",
|
89 |
"</div>"
|
90 |
],
|
91 |
"text/plain": [
|
92 |
-
"
|
93 |
-
"0
|
94 |
-
"1
|
95 |
-
"2
|
96 |
-
"3
|
97 |
-
"4
|
98 |
"\n",
|
99 |
-
" title \n",
|
100 |
-
"0 Will the
|
101 |
-
"1 Will
|
102 |
-
"2 Will the
|
103 |
-
"3 Will
|
104 |
-
"4 Will
|
105 |
]
|
106 |
},
|
107 |
-
"execution_count":
|
108 |
"metadata": {},
|
109 |
"output_type": "execute_result"
|
110 |
}
|
@@ -113,6 +119,108 @@
|
|
113 |
"fpmms.head()"
|
114 |
]
|
115 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
{
|
117 |
"cell_type": "code",
|
118 |
"execution_count": 4,
|
|
|
2 |
"cells": [
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
+
"execution_count": 1,
|
6 |
"metadata": {},
|
7 |
"outputs": [],
|
8 |
"source": [
|
|
|
15 |
},
|
16 |
{
|
17 |
"cell_type": "code",
|
18 |
+
"execution_count": 5,
|
19 |
"metadata": {},
|
20 |
"outputs": [],
|
21 |
"source": [
|
22 |
+
"fpmms = pd.read_parquet('../data/all_fpmms.parquet')"
|
23 |
]
|
24 |
},
|
25 |
{
|
26 |
"cell_type": "code",
|
27 |
+
"execution_count": 6,
|
28 |
"metadata": {},
|
29 |
"outputs": [
|
30 |
{
|
|
|
48 |
" <thead>\n",
|
49 |
" <tr style=\"text-align: right;\">\n",
|
50 |
" <th></th>\n",
|
|
|
51 |
" <th>currentAnswer</th>\n",
|
52 |
+
" <th>id</th>\n",
|
53 |
" <th>title</th>\n",
|
54 |
+
" <th>market_creator</th>\n",
|
55 |
" </tr>\n",
|
56 |
" </thead>\n",
|
57 |
" <tbody>\n",
|
58 |
" <tr>\n",
|
59 |
" <th>0</th>\n",
|
|
|
60 |
" <td>No</td>\n",
|
61 |
+
" <td>0x0017cd58d6a7ee1451388c7d5b1051b4c0a041f5</td>\n",
|
62 |
+
" <td>Will the first floating offshore wind research...</td>\n",
|
63 |
+
" <td>quickstart</td>\n",
|
64 |
" </tr>\n",
|
65 |
" <tr>\n",
|
66 |
" <th>1</th>\n",
|
|
|
67 |
" <td>No</td>\n",
|
68 |
+
" <td>0x0020d13c89140b47e10db54cbd53852b90bc1391</td>\n",
|
69 |
+
" <td>Will the Francis Scott Key Bridge in Baltimore...</td>\n",
|
70 |
+
" <td>quickstart</td>\n",
|
71 |
" </tr>\n",
|
72 |
" <tr>\n",
|
73 |
" <th>2</th>\n",
|
74 |
+
" <td>No</td>\n",
|
75 |
+
" <td>0x003ae5e007cc38b3f86b0ed7c82f938a1285ac07</td>\n",
|
76 |
+
" <td>Will FC Saarbrucken reach the final of the Ger...</td>\n",
|
77 |
+
" <td>quickstart</td>\n",
|
78 |
" </tr>\n",
|
79 |
" <tr>\n",
|
80 |
" <th>3</th>\n",
|
|
|
81 |
" <td>Yes</td>\n",
|
82 |
+
" <td>0x004c8d4c619dc6b9caa940f5ea7ef699ae85359c</td>\n",
|
83 |
+
" <td>Will the pro-life activists convicted for 'con...</td>\n",
|
84 |
+
" <td>quickstart</td>\n",
|
85 |
" </tr>\n",
|
86 |
" <tr>\n",
|
87 |
" <th>4</th>\n",
|
88 |
+
" <td>Yes</td>\n",
|
89 |
+
" <td>0x005e3f7a90585acbec807425a750fbba1d0c2b5c</td>\n",
|
90 |
+
" <td>Will Apple announce the release of a new M4 ch...</td>\n",
|
91 |
+
" <td>quickstart</td>\n",
|
92 |
" </tr>\n",
|
93 |
" </tbody>\n",
|
94 |
"</table>\n",
|
95 |
"</div>"
|
96 |
],
|
97 |
"text/plain": [
|
98 |
+
" currentAnswer id \\\n",
|
99 |
+
"0 No 0x0017cd58d6a7ee1451388c7d5b1051b4c0a041f5 \n",
|
100 |
+
"1 No 0x0020d13c89140b47e10db54cbd53852b90bc1391 \n",
|
101 |
+
"2 No 0x003ae5e007cc38b3f86b0ed7c82f938a1285ac07 \n",
|
102 |
+
"3 Yes 0x004c8d4c619dc6b9caa940f5ea7ef699ae85359c \n",
|
103 |
+
"4 Yes 0x005e3f7a90585acbec807425a750fbba1d0c2b5c \n",
|
104 |
"\n",
|
105 |
+
" title market_creator \n",
|
106 |
+
"0 Will the first floating offshore wind research... quickstart \n",
|
107 |
+
"1 Will the Francis Scott Key Bridge in Baltimore... quickstart \n",
|
108 |
+
"2 Will FC Saarbrucken reach the final of the Ger... quickstart \n",
|
109 |
+
"3 Will the pro-life activists convicted for 'con... quickstart \n",
|
110 |
+
"4 Will Apple announce the release of a new M4 ch... quickstart "
|
111 |
]
|
112 |
},
|
113 |
+
"execution_count": 6,
|
114 |
"metadata": {},
|
115 |
"output_type": "execute_result"
|
116 |
}
|
|
|
119 |
"fpmms.head()"
|
120 |
]
|
121 |
},
|
122 |
+
{
|
123 |
+
"cell_type": "code",
|
124 |
+
"execution_count": 9,
|
125 |
+
"metadata": {},
|
126 |
+
"outputs": [
|
127 |
+
{
|
128 |
+
"data": {
|
129 |
+
"text/plain": [
|
130 |
+
"currentAnswer\n",
|
131 |
+
"No 2583\n",
|
132 |
+
"Yes 1833\n",
|
133 |
+
"no 1\n",
|
134 |
+
"False 1\n",
|
135 |
+
"IND 1\n",
|
136 |
+
"Name: count, dtype: int64"
|
137 |
+
]
|
138 |
+
},
|
139 |
+
"execution_count": 9,
|
140 |
+
"metadata": {},
|
141 |
+
"output_type": "execute_result"
|
142 |
+
}
|
143 |
+
],
|
144 |
+
"source": [
|
145 |
+
"fpmms.currentAnswer.value_counts()"
|
146 |
+
]
|
147 |
+
},
|
148 |
+
{
|
149 |
+
"cell_type": "code",
|
150 |
+
"execution_count": 7,
|
151 |
+
"metadata": {},
|
152 |
+
"outputs": [
|
153 |
+
{
|
154 |
+
"data": {
|
155 |
+
"text/plain": [
|
156 |
+
"market_creator\n",
|
157 |
+
"quickstart 4252\n",
|
158 |
+
"pearl 167\n",
|
159 |
+
"Name: count, dtype: int64"
|
160 |
+
]
|
161 |
+
},
|
162 |
+
"execution_count": 7,
|
163 |
+
"metadata": {},
|
164 |
+
"output_type": "execute_result"
|
165 |
+
}
|
166 |
+
],
|
167 |
+
"source": [
|
168 |
+
"fpmms.market_creator.value_counts()"
|
169 |
+
]
|
170 |
+
},
|
171 |
+
{
|
172 |
+
"cell_type": "code",
|
173 |
+
"execution_count": 8,
|
174 |
+
"metadata": {},
|
175 |
+
"outputs": [
|
176 |
+
{
|
177 |
+
"name": "stdout",
|
178 |
+
"output_type": "stream",
|
179 |
+
"text": [
|
180 |
+
"<class 'pandas.core.frame.DataFrame'>\n",
|
181 |
+
"RangeIndex: 4419 entries, 0 to 4418\n",
|
182 |
+
"Data columns (total 4 columns):\n",
|
183 |
+
" # Column Non-Null Count Dtype \n",
|
184 |
+
"--- ------ -------------- ----- \n",
|
185 |
+
" 0 currentAnswer 4419 non-null object\n",
|
186 |
+
" 1 id 4419 non-null object\n",
|
187 |
+
" 2 title 4419 non-null object\n",
|
188 |
+
" 3 market_creator 4419 non-null object\n",
|
189 |
+
"dtypes: object(4)\n",
|
190 |
+
"memory usage: 138.2+ KB\n"
|
191 |
+
]
|
192 |
+
}
|
193 |
+
],
|
194 |
+
"source": [
|
195 |
+
"fpmms.info()"
|
196 |
+
]
|
197 |
+
},
|
198 |
+
{
|
199 |
+
"cell_type": "code",
|
200 |
+
"execution_count": 4,
|
201 |
+
"metadata": {},
|
202 |
+
"outputs": [
|
203 |
+
{
|
204 |
+
"data": {
|
205 |
+
"text/plain": [
|
206 |
+
"currentAnswer\n",
|
207 |
+
"No 2495\n",
|
208 |
+
"Yes 1746\n",
|
209 |
+
"no 1\n",
|
210 |
+
"False 1\n",
|
211 |
+
"IND 1\n",
|
212 |
+
"Name: count, dtype: int64"
|
213 |
+
]
|
214 |
+
},
|
215 |
+
"execution_count": 4,
|
216 |
+
"metadata": {},
|
217 |
+
"output_type": "execute_result"
|
218 |
+
}
|
219 |
+
],
|
220 |
+
"source": [
|
221 |
+
"fpmms.currentAnswer.value_counts()"
|
222 |
+
]
|
223 |
+
},
|
224 |
{
|
225 |
"cell_type": "code",
|
226 |
"execution_count": 4,
|