Skip to content

Instantly share code, notes, and snippets.

@LinuxIsCool
Last active August 2, 2023 19:34
Show Gist options
  • Select an option

  • Save LinuxIsCool/b8145e99c7310b3c79e76740a1e9d161 to your computer and use it in GitHub Desktop.

Select an option

Save LinuxIsCool/b8145e99c7310b3c79e76740a1e9d161 to your computer and use it in GitHub Desktop.
Jupyter Lab Pro Tips

Jupyter Tips Threads ✨

  1. Use jupyterlab-unfold for directory tree views: pip install jupyterlab-unfold
  2. <ctrl,> to toggle settings
  3. Use Tabulator and Panel for making interactive data explorers: https://panel.holoviz.org/reference/widgets/Tabulator.html
  4. Use Hvplot Explorer for exploring new data: https://hvplot.holoviz.org/user_guide/Explorer.html - Learn about hvplot explorer here: https://www.youtube.com/watch?v=QbPHVcyAGx8
  5. Use icecream for logging and printing: https://github.com/gruns/icecream
from icecream import ic
ic.configureOutput(prefix='',outputFunction=print)
ic(len(df[df['success']==False]))
  1. Use Langchain and OpenAI for exploring dataframes: https://python.langchain.com/docs/integrations/toolkits/pandas
from langchain.agents import create_pandas_dataframe_agent
from langchain.llms import OpenAI

agent = create_pandas_dataframe_agent(OpenAI(temperature=0), df, verbose=False)

command = agent.run("List columns that only have one value. Return a dataframe that removes those columns.")
  1. Use Python Poetry for dependency management: https://python-poetry.org/
  2. Use Nbdev for packaging and publish software: https://nbdev.fast.ai/

Thread: https://twitter.com/ygg_anderson/status/1669928219653574656

@LinuxIsCool
Copy link
Author

LinuxIsCool commented Aug 1, 2023

For #1, careful. I noticed that it's not working with jupyterlab==4.0.3.

I switched to jupyterlab3.6.0 with poetry add jupyterlab==3.6.0.

I find that jupyterlab version 4 is generally buggy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment