You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/getting_started/tutorials/13.ctable-basics.ipynb
+5-61Lines changed: 5 additions & 61 deletions
Original file line number
Diff line number
Diff line change
@@ -774,12 +774,7 @@
774
774
"cell_type": "markdown",
775
775
"id": "4f466e5d",
776
776
"metadata": {},
777
-
"source": [
778
-
"### 3.3 Sorting\n",
779
-
"\n",
780
-
"`sort_by()` returns a sorted copy by default (or sorts in-place with `inplace=True`).\n",
781
-
"Multi-column sorting is supported — primary key first."
782
-
]
777
+
"source": "### 3.3 Sorting\n\n`sort_by()` returns a sorted copy by default (or sorts in-place with `inplace=True`).\nPass `view=True` for a zero-copy sorted **view** that shares the table's data and gathers\nrows on demand — ideal for reading a sorted slice of a large table without copying it.\nMulti-column sorting is supported — primary key first."
783
778
},
784
779
{
785
780
"cell_type": "code",
@@ -1197,37 +1192,9 @@
1197
1192
"start_time": "2026-05-21T09:38:01.039615Z"
1198
1193
}
1199
1194
},
1200
-
"source": [
1201
-
"# Top 10 hottest days in Madrid across the whole year\n",
1202
-
"# Sort the full table, then filter — views cannot be sorted directly\n",
"source": "# Top 10 hottest days in Madrid across the whole year.\n# Views *can* be sorted: sort_by() on a where()-view returns a zero-copy sorted\n# view — it shares the table's columns and gathers rows on demand, no full-table\n# copy. (On a base table, pass view=True for the same lazy behaviour.)\nmadrid = climate.where(climate.city == \"Madrid\")\nmadrid_sorted = madrid.sort_by(\"temperature\", ascending=False)\nprint(\"10 hottest days in Madrid:\")\nprint(madrid_sorted.select([\"city\", \"day\", \"temperature\", \"humidity\"]).head(10))",
0 commit comments