Positron IDE: Data Analysis with Python in Jupyter Notebooks and Python Script Files (Public Beta)

Sdílet
Vložit
  • čas přidán 15. 07. 2024
  • Timeline ---
    00:00 Intro to Positron IDE for data science.
    00:15 Focus on Python; other videos cover R.
    00:27 Check Python interpreter or environments.
    01:10 View environment and interpreter details.
    01:23 Switch environments; auto-detects/install dependencies.
    01:54 Auto-installs ipykernel if missing.
    02:02 Transition between environments.
    02:35 Use the new project wizard if needed.
    02:45 Create Jupyter notebook or Python project.
    03:32 Set up Python environment with Venv or Conda.
    04:12 Skip adding new environment; already set up.
    04:30 New Notebook vs. New File options.
    04:40 Selecting New File lists document options.
    05:10 Create Python Notebook on welcome screen.
    05:20 Run code immediately in the new notebook.
    05:30 Describe code cell execution and output display.
    06:03 Cell toolbar actions available.
    06:35 Save notebook with Cmd+S (macOS) or Ctrl+S (Windows).
    06:55 Create a new folder, save the notebook.
    07:25 Saved notebook path and breadcrumb navigation.
    08:10 Add code and markdown cells from the toolbar.
    09:10 Switch between Python environments and kernels.
    10:05 Run cells, view variable values in the session tab.
    10:39 Environment issues when switching kernels.
    11:09 Variables and data types in the session tab.
    11:33 Separation between Jupyter notebook kernel and console.
    13:00 Open folder, refresh Positron to execute code.
    13:13 Trust authors to allow code execution.
    13:57 Set and start interpreter for workspace.
    14:14 Reopen notebook, restart kernel, run all cells.
    14:45 Hide Explorer tab for more screen space.
    15:21 Clear outputs, run cells again.
    15:55 Use a pre-made notebook with data analysis code.
    16:40 Launch pre-made notebook from Explorer tab.
    16:45 Select notebook kernel, start running code.
    17:00 Running code updates variables tab with function data.
    17:20 Print statements for all cell outputs.
    17:47 Keyboard shortcuts for Jupyter Notebook.
    18:10 Run cell to download data, clickable URLs.
    18:45 Download and access dataset in project directory.
    18:55 Use automagic commands to navigate notebook and data.
    19:13 Load data into 'penguins' variable, view in session tab.
    19:25 Variable viewer details, data frame variables, observations.
    20:12 Trigger data viewer inline with %view.
    21:33 Interactive data viewer features.
    24:07 Actions in data viewer don't affect pandas' data frame.
    24:35 Use pandas commands to view data.
    24:50 Function help documentation under Help tab.
    26:22 Visualization libraries: matplotlib, plotnine, seaborn.
    26:45 Use %%capture to suppress output, %pip to install package.
    27:48 Interactive visualization libraries: Bokeh, Plotly, Altair.
    28:00 Interactivity in Bokeh plot.
    28:48 Set render for Plotly plots in Positron.
    29:19 Altair for visualization.
    29:30 Display summaries.
    29:45 Help entry and correlation matrix.
    30:10 Handle missing data.
    30:30 Create linear regression models with statsmodels, visualize with Seaborn.
    31:16 Export notebook to PDF, HTML, Python script.
    33:03 Exporting to Python script generates non-runnable script.
    33:39 Workable Python script with # %% or line by line execution.
    35:04 Console shows Pandas table with HTML formatting.
    35:28 Graphs shown in lower right plot window.
    36:00 Plot history viewer, navigate previous plot iterations.
    36:50 Interactive plots work.
    37:23 Final notes.
    Summary ---
    We look at the Positron IDE's Python capabilities in terms of data analysis within a Jupyter Notebook and Python Script. We aim to use a pre-existing Python interpreter and associate the code files within a workspace directory. We explore many features from static to interactive plots and using pandas data frames within a notebook and console session. Moreover, we discuss the notebook session being detached from the console session.
    Links ---
    Data location:
    github.com/coatless/raw-data/...
    Relevant script file:
    github.com/coatless-videos/po...
    Positron Interactive Data Viewer Wiki Page
    github.com/posit-dev/positron...
    Positron can be obtained from:
    github.com/posit-dev/positron
    Version information ----
    This was demonstrated on:
    Positron Version: 2024.06.1 (Universal) build 27
    Code - OSS Version: 1.90.0
    Commit: a893e5b282612ccb2200102957ac38d3c14e5196
    Date: 2024-06-26T02:08:06.673Z
    Electron: 29.4.0
    Chromium: 122.0.6261.156
    Node.js: 20.9.0
    V8: 12.2.281.27-electron.0
    OS: Darwin arm64 23.5.0
    #positron #posit #rstudio #jupyternotebook #plotnine #seaborn #pandas #plotly #csv
  • Věda a technologie

Komentáře • 7

  • @arthuryounger9340
    @arthuryounger9340 Před 9 dny +1

    Thanks for an excellent practical introduction to python in Positron!

  • @ortayakarsk705
    @ortayakarsk705 Před 6 dny

    Do you think 4 gb rtx3050 enough for data analysis?

    • @thecoatlessprofessor7674
      @thecoatlessprofessor7674  Před 6 dny

      The Positron IDE and Python are RAM and CPU hungry. Unless you are fitting a neural network/doing deep learning, the amount of RAM on a GPU is unlikely to play a role in being able to do data analysis effectively.

  • @_jhc
    @_jhc Před 9 dny

    Is there support for using this IDE with Databricks?

    • @thecoatlessprofessor7674
      @thecoatlessprofessor7674  Před 9 dny +1

      You can establish a connection using odbc to a Databricks cluster via its connection panel, c.f.
      solutions.posit.co/connections/db/databases/databricks/

    • @_jhc
      @_jhc Před 8 dny

      @@thecoatlessprofessor7674 Thank you!