diff --git a/notebooks/demo/nxcg_wikipedia_e2e.ipynb b/notebooks/demo/nxcg_wikipedia_e2e.ipynb index d8c0656627..ca1c9d3ef5 100644 --- a/notebooks/demo/nxcg_wikipedia_e2e.ipynb +++ b/notebooks/demo/nxcg_wikipedia_e2e.ipynb @@ -75,7 +75,16 @@ " sep=\" \",\n", " names=[\"src\", \"dst\"],\n", " dtype=\"int32\",\n", - ")\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%%time\n", "\n", "# Read the Wikipedia Page metadata from `nodedata_csv`\n", "nodedata_df = pd.read_csv(\n", @@ -83,7 +92,16 @@ " sep=\"\\t\",\n", " names=[\"nodeid\", \"title\"],\n", " dtype={\"nodeid\": \"int32\", \"title\": \"str\"},\n", - ")\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%%time\n", "\n", "# Create a NetworkX graph from the connectivity info\n", "G = nx.from_pandas_edgelist(\n", @@ -91,16 +109,43 @@ " source=\"src\",\n", " target=\"dst\",\n", " create_using=nx.DiGraph,\n", - ")\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%%time\n", "\n", "# Run pagerank on NetworkX\n", - "nx_pr_vals = nx.pagerank(G)\n", + "nx_pr_vals = nx.pagerank(G)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%%time\n", "\n", "# Create a DataFrame containing the results\n", "pagerank_df = pd.DataFrame({\n", " \"nodeid\": nx_pr_vals.keys(),\n", " \"pagerank\": nx_pr_vals.values()\n", - "})\n", + "})" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%%time\n", "\n", "# Add NetworkX results to `nodedata` as new columns\n", "nodedata_df = nodedata_df.merge(pagerank_df, how=\"left\", on=\"nodeid\")\n",