Skip to content

Commit

Permalink
small fix to example
Browse files Browse the repository at this point in the history
  • Loading branch information
Walnut356 committed Apr 30, 2023
1 parent a30585c commit 2d138c8
Showing 1 changed file with 0 additions and 49 deletions.
49 changes: 0 additions & 49 deletions StatsExamples/l_cancel_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -434,55 +434,6 @@
" .agg([pl.col(\"l_cancel\").mean(), pl.count()])\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div><style>\n",
".dataframe > thead > tr > th,\n",
".dataframe > tbody > tr > td {\n",
" text-align: right;\n",
"}\n",
"</style>\n",
"<small>shape: (22_746, 2)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>frame_index</th><th>l_cancel</th></tr><tr><td>i64</td><td>f64</td></tr></thead><tbody><tr><td>125</td><td>1.0</td></tr><tr><td>128</td><td>1.0</td></tr><tr><td>130</td><td>1.0</td></tr><tr><td>130</td><td>1.0</td></tr><tr><td>140</td><td>1.0</td></tr><tr><td>141</td><td>1.0</td></tr><tr><td>142</td><td>1.0</td></tr><tr><td>145</td><td>1.0</td></tr><tr><td>147</td><td>1.0</td></tr><tr><td>148</td><td>1.0</td></tr><tr><td>149</td><td>1.0</td></tr><tr><td>151</td><td>1.0</td></tr><tr><td>&hellip;</td><td>&hellip;</td></tr><tr><td>16965</td><td>1.0</td></tr><tr><td>16984</td><td>1.0</td></tr><tr><td>17215</td><td>1.0</td></tr><tr><td>17278</td><td>1.0</td></tr><tr><td>17280</td><td>1.0</td></tr><tr><td>17305</td><td>0.75</td></tr><tr><td>17410</td><td>1.0</td></tr><tr><td>17441</td><td>1.0</td></tr><tr><td>17593</td><td>1.0</td></tr><tr><td>18361</td><td>0.0</td></tr><tr><td>18553</td><td>1.0</td></tr><tr><td>18586</td><td>0.5</td></tr></tbody></table></div>"
],
"text/plain": [
"shape: (22_746, 2)\n",
"┌─────────────┬──────────┐\n",
"│ frame_index ┆ l_cancel │\n",
"│ --- ┆ --- │\n",
"│ i64 ┆ f64 │\n",
"╞═════════════╪══════════╡\n",
"│ 125 ┆ 1.0 │\n",
"│ 128 ┆ 1.0 │\n",
"│ 130 ┆ 1.0 │\n",
"│ 130 ┆ 1.0 │\n",
"│ … ┆ … │\n",
"│ 17593 ┆ 1.0 │\n",
"│ 18361 ┆ 0.0 │\n",
"│ 18553 ┆ 1.0 │\n",
"│ 18586 ┆ 0.5 │\n",
"└─────────────┴──────────┘"
]
},
"execution_count": 35,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"( # L cancel percentage by stocks remaining\n",
" l_cancel.filter(pl.col(\"character\") == \"FALCO\")\n",
" .sort(pl.col(\"frame_index\"))\n",
" .groupby_rolling(\"frame_index\", period=\"100i\")\n",
" .agg(pl.col(\"l_cancel\").mean())\n",
")"
]
}
],
"metadata": {
Expand Down

0 comments on commit 2d138c8

Please sign in to comment.