{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/var/folders/l_/g22b1g_n0gn4tmx9lkxqv5x00000gn/T/ipykernel_14130/269978020.py:6: DtypeWarning: Columns (7,10) have mixed types. Specify dtype option on import or set low_memory=False.\n", " tools = pd.read_csv(\"../data/tools.csv\")\n" ] } ], "source": [ "import pickle\n", "import pandas as pd\n", "from pathlib import Path\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Make t_map" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "tools = pd.read_csv(\"../data/tools.csv\")" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Index(['request_id', 'request_block', 'prompt_request', 'tool', 'nonce',\n", " 'trader_address', 'deliver_block', 'error', 'error_message',\n", " 'prompt_response', 'mech_address', 'p_yes', 'p_no', 'confidence',\n", " 'info_utility', 'vote', 'win_probability', 'title', 'currentAnswer',\n", " 'request_time', 'request_month_year', 'request_month_year_week'],\n", " dtype='object')" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tools.columns" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "import pickle\n", "t_map = tools[['request_block', 'request_time']].set_index('request_block').to_dict()['request_time']\n", "\n", "with open('../data/t_map.pkl', 'wb') as f:\n", " pickle.dump(t_map, f)\n", "\n" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "with open('../data/t_map.pkl', 'rb') as f:\n", " t_map = pickle.load(f)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Markets" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Index(['id', 'currentAnswer', 'title'], dtype='object')" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "fpmms = pd.read_csv(\"../data/fpmms.csv\")\n", "fpmms.columns\n" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | id | \n", "currentAnswer | \n", "title | \n", "
---|---|---|---|
0 | \n", "0x0020d13c89140b47e10db54cbd53852b90bc1391 | \n", "No | \n", "Will the Francis Scott Key Bridge in Baltimore... | \n", "
1 | \n", "0x003ae5e007cc38b3f86b0ed7c82f938a1285ac07 | \n", "No | \n", "Will FC Saarbrucken reach the final of the Ger... | \n", "
2 | \n", "0x004c8d4c619dc6b9caa940f5ea7ef699ae85359c | \n", "Yes | \n", "Will the pro-life activists convicted for 'con... | \n", "
3 | \n", "0x0094fa304017d5c2b355790e2976f769ea600492 | \n", "No | \n", "Will the Hisense U8K be considered a top-tier ... | \n", "
4 | \n", "0x00b03e86def06f5afb3b5219df72df758c96ec87 | \n", "Yes | \n", "Will the ChatGPT app for Android exceed 1 mill... | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "
3020 | \n", "0xff866fd6092f8cc779fed6480e8a0a00740c4685 | \n", "Yes | \n", "Will Nvidia's market value exceed $2 trillion ... | \n", "
3021 | \n", "0xff8fedb76e6659f9da2505b28e86ea3a7db282e7 | \n", "Yes | \n", "Will UFC face a boycott due to its $100M Bud L... | \n", "
3022 | \n", "0xff94627786768f5d94f7e5687de131b34c4b0c0d | \n", "Yes | \n", "Will there be another volcanic eruption in Gri... | \n", "
3023 | \n", "0xffd0b522ff00ffaec575cc628d1bb4ea37346fd7 | \n", "No | \n", "Will the manslaughter trial for James Crumbley... | \n", "
3024 | \n", "0xffd6f34459ff26040e9cf1d9e4d9aaa7026a9683 | \n", "No | \n", "Will YouTube's subscribe button light up whene... | \n", "
3025 rows × 3 columns
\n", "