diff --git a/ipynb/examples/analysis_plots.ipynb b/ipynb/examples/analysis_plots.ipynb index d7edeec65adc45670c20a13058390228a05649d2..34a828da75a0539c226714fc41ec1755da54bdc7 100644 --- a/ipynb/examples/analysis_plots.ipynb +++ b/ipynb/examples/analysis_plots.ipynb @@ -72,13 +72,33 @@ ")" ] }, + { + "cell_type": "markdown", + "id": "1de9251f-600c-4c4e-aaf7-9a1960911237", + "metadata": {}, + "source": [ + "# DataFrame libraries\n", + "LISA supports two dataframe (table) libraries:\n", + "* polars: https://docs.pola.rs/api/python/stable/reference/index.html\n", + "* pandas: https://pandas.pydata.org/docs/index.html\n", + "\n", + "Polars is a more modern alternative to pandas and most of the internal machinery of LISA has been moved to polars. At this point, pandas is available for backward compatibility and some internal code still has not been converted, but eventually there will not be any direct dependencies on pandas anymore. Since most dataframe-producing APIs are related to the Trace class, the switch between the two libraries can be achieved at that level:" + ] + }, { "cell_type": "code", "execution_count": null, - "id": "abc684b9-4891-44c7-9be3-918c812be32d", + "id": "30e1c1ef-ea1e-4e65-9174-6f2f8216cb4d", "metadata": {}, "outputs": [], - "source": [] + "source": [ + "import polars as pl\n", + "\n", + "# This creates a view of the trace that will provide polars.LazyFrame dataframes.\n", + "# It is also possible to create the trace object for polars directly with\n", + "# Trace(..., df_fmt='polars-lazyframe'). The result is the same.\n", + "trace = trace.get_view(df_fmt='polars-lazyframe')" + ] }, { "cell_type": "markdown", @@ -318,7 +338,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.4" + "version": "3.12.3" } }, "nbformat": 4, diff --git a/ipynb/tests/synthetics_example.ipynb b/ipynb/tests/synthetics_example.ipynb index 4d7461dcf8c9a335062a8cde1f51843dc64a1e4b..b0d94af51f141355e3900032f075184a3778149e 100644 --- a/ipynb/tests/synthetics_example.ipynb +++ b/ipynb/tests/synthetics_example.ipynb @@ -5112,15 +5112,6 @@ "execution_count": 9, "metadata": {}, "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2021-07-01 17:28:40,600 WARNING : py.warnings : /tmp/ipykernel_108817/2525158218.py:1: DeprecationWarning: lisa.trace.TraceBase.df_all_events is deprecated and will be removed in version 3.0, use lisa.analysis.notebook.NotebookAnalysis.df_all_event instead: This method has been deprecated and is an alias for \"trace.ana.notebook.df_all_events()\"\n", - " bundle.trace.df_all_events()\n", - "\n" - ] - }, { "data": { "text/html": [ @@ -5223,7 +5214,7 @@ } ], "source": [ - "bundle.trace.df_all_events()" + "bundle.trace.notebook.df_all_events()" ] }, {