{
"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 here for more info. \n",
"\u001b[1;31mView Jupyter log 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
}