File size: 2,993 Bytes
3b9d70e
 
 
 
d2a6037
3b9d70e
8ba86e5
3b9d70e
8ba86e5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3b9d70e
 
 
 
d2a6037
9fdf491
d2a6037
 
 
 
 
 
 
 
 
 
 
 
 
9fdf491
d2a6037
 
9fdf491
d2a6037
 
9fdf491
d2a6037
 
9fdf491
 
 
 
d2a6037
3b9d70e
 
 
9fdf491
 
 
 
 
 
 
 
 
 
 
d2a6037
9fdf491
 
 
 
 
d2a6037
3b9d70e
 
 
 
 
 
 
 
 
 
 
 
8ba86e5
3b9d70e
 
 
 
 
 
 
 
 
 
 
 
 
 
8ba86e5
3b9d70e
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "from datetime import datetime\n",
    "from tqdm import tqdm\n",
    "\n",
    "import time\n",
    "import requests\n",
    "import datetime\n",
    "import pandas as pd\n",
    "from collections import defaultdict\n",
    "from typing import Any, Union\n",
    "from string import Template\n",
    "from enum import Enum\n",
    "from tqdm import tqdm\n",
    "import numpy as np\n",
    "from pathlib import Path"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "ename": "",
     "evalue": "",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31mThe Kernel crashed while executing code in the current cell or a previous cell. \n",
      "\u001b[1;31mPlease review the code in the cell(s) to identify a possible cause of the failure. \n",
      "\u001b[1;31mClick <a href='https://aka.ms/vscodeJupyterKernelCrash'>here</a> for more info. \n",
      "\u001b[1;31mView Jupyter <a href='command:jupyter.viewOutput'>log</a> for further details."
     ]
    }
   ],
   "source": [
    "tools_df = pd.read_parquet(\"./data/tools.parquet\")\n",
    "trades_df = pd.read_parquet(\"./data/all_trades_profitability.parquet\")\n",
    "\n",
    "tools_df['request_time'] = pd.to_datetime(tools_df['request_time'])\n",
    "tools_df = tools_df[tools_df['request_time'].dt.year == 2024]\n",
    "\n",
    "trades_df['creation_timestamp'] = pd.to_datetime(trades_df['creation_timestamp'])\n",
    "trades_df = trades_df[trades_df['creation_timestamp'].dt.year == 2024]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['trader_address', 'trade_id', 'creation_timestamp', 'title',\n",
       "       'market_status', 'collateral_amount', 'outcome_index',\n",
       "       'trade_fee_amount', 'outcomes_tokens_traded', 'current_answer',\n",
       "       'is_invalid', 'winning_trade', 'earnings', 'redeemed',\n",
       "       'redeemed_amount', 'num_mech_calls', 'mech_fee_amount', 'net_earnings',\n",
       "       'roi'],\n",
       "      dtype='object')"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "trades_df.columns\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "akash",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.14"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}