Skip to content

Commit 22a5893

Browse files
committed
Revert display using pandas in notebook
Code was not supported by all pandas versions
1 parent dcc9ac7 commit 22a5893

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

doc/modules/ROOT/pages/tutorials/gds-sessions-self-managed.adoc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ delete the session ourselves.
8484
----
8585
import os
8686
from graphdatascience.session import DbmsConnectionInfo, AlgorithmCategory, CloudLocation
87+
from datetime import timedelta
8788
8889
# Identify the Neo4j DBMS
8990
db_connection = DbmsConnectionInfo(uri=os.environ["NEO4J_URI"], username=os.environ["NEO4J_USER"], password=os.environ["NEO4J_PASSWORD"])
@@ -113,11 +114,12 @@ what that looks like
113114

114115
[source, python, role=no-test]
115116
----
116-
gds_sessions = sessions.list()
117+
%uv pip show pandas
118+
----
117119

118-
# Display the sessions
119-
from pandas import DataFrame
120-
DataFrame(gds_sessions)
120+
[source, python, role=no-test]
121+
----
122+
gds_sessions = sessions.list()
121123
----
122124

123125
== Adding a dataset

doc/modules/ROOT/pages/tutorials/gds-sessions.adoc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,6 @@ what that looks like
111111
[source, python, role=no-test]
112112
----
113113
sessions.list()
114-
115-
# Display the sessions
116-
from pandas import DataFrame
117-
DataFrame(sessions)
118114
----
119115

120116
== Adding a dataset

examples/gds-sessions-self-managed.ipynb

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@
122122
"source": [
123123
"import os\n",
124124
"from graphdatascience.session import DbmsConnectionInfo, AlgorithmCategory, CloudLocation\n",
125+
"from datetime import timedelta\n",
125126
"\n",
126127
"# Identify the Neo4j DBMS\n",
127128
"db_connection = DbmsConnectionInfo(uri=os.environ[\"NEO4J_URI\"], username=os.environ[\"NEO4J_USER\"], password=os.environ[\"NEO4J_PASSWORD\"])\n",
@@ -159,11 +160,16 @@
159160
"metadata": {},
160161
"outputs": [],
161162
"source": [
162-
"gds_sessions = sessions.list()\n",
163-
"\n",
164-
"# Display the sessions\n",
165-
"from pandas import DataFrame\n",
166-
"DataFrame(gds_sessions)"
163+
"%uv pip show pandas"
164+
]
165+
},
166+
{
167+
"cell_type": "code",
168+
"execution_count": null,
169+
"metadata": {},
170+
"outputs": [],
171+
"source": [
172+
"gds_sessions = sessions.list()"
167173
]
168174
},
169175
{

examples/gds-sessions.ipynb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,7 @@
155155
"metadata": {},
156156
"outputs": [],
157157
"source": [
158-
"sessions.list()\n",
159-
"\n",
160-
"# Display the sessions\n",
161-
"from pandas import DataFrame\n",
162-
"DataFrame(sessions)"
158+
"sessions.list()"
163159
]
164160
},
165161
{

0 commit comments

Comments
 (0)