Python shortcuts πŸš€ you wish you knew earlier


Welcome back to Pandas Daily! Your daily 5-minute boost to becoming confident in Python.

​

TGIF!! As I wrap up for the weekend, I remember the times I scrolled endlessly through long Python notebooks just to find one bug. Frustrating 😩

Thanks to a friend who told me about Jupyter shortcuts. Life has changed completely after knowing them. I only use keyboard while coding, and can surely log-off for the weekend early πŸ˜€

Sharing a few with you. These will save hours. Should work for most ipynb (Jupyter notebook style) files. Learn a few for a fruitful weekend πŸŽ‰πŸΎ

​

🎬 Cell Editing & Modes

  1. Enter β†’ Switch to Edit Mode (type inside a cell).
  2. Esc β†’ Switch to Command Mode (select/manage cells).
  3. Y β†’ Change cell to Code.
  4. M β†’ Change cell to Markdown.
  5. Ctrl + / β†’ Comment/Uncomment selected lines.
  6. Tab β†’ Code completion / suggestions.

​

▢️ Cell Navigation and execution

  1. Shift + Enter β†’ Run current cell, move to next.
  2. Ctrl + Enter β†’ Run current cell, stay in place.
  3. Alt + Enter β†’ Run current cell, insert new one below.
  4. A β†’ Insert new cell above (Command Mode).
  5. B β†’ Insert new cell below (Command Mode).
  6. D, D (press D twice) β†’ Delete current cell.
  7. Z β†’ Undo cell deletion.

​

πŸš€ Productivity Boosters

  1. Shift + M β†’ Merge selected cells.
  2. L β†’ Toggle line numbers (in Command Mode).
  3. Shift + ↑/↓ β†’ Select multiple cells.
  4. Ctrl + Shift + P β†’ Open command palette.
  5. Q β†’ Close notebook (depends on JupyterLab).

β­πŸ“£ That's it for today! If you liked it, please share it with anyone who will find it useful and share your feedback below 🐼

Pandas Daily

Beginner to Expert in Python in just 5 minutes

Read more from Pandas Daily

Welcome back to Pandas Daily! Your daily 5-minute boost to becoming confident in Python. You have a spreadsheet with 500 numbers. Your boss asks: "What do you see?" Most will freeze, scroll, guess. Not you! 3 Python functions to turn raw numbers into answers. No calculator, excel sheets. Just code. Statistics isn't boring math. It's how you make decisions with data. Using just the statistics module we find "center" of any dataset. Any data analyst must know the basics‼️ 🎯 Compute simple...

Welcome back to Pandas Daily! Your daily 5-minute boost to becoming confident in Python. Last week we introduced numpy. Created bunch of arrays, sliced them and did some math with them. To prepare data for machine learning or any analysis, we need to learn to control their shape. Today - Reshape flat lists into grids. Flatten 2D tables back to 1D arrays. Create arrays filled with zeros, ones, or random numbers. βͺ Recap: See dimensions first In: import numpy as np sales = np.array([120, 340,...

Welcome back to Pandas Daily! Your daily 5-minute boost to becoming confident in Python. TGIF! Everyone is talking about AI. Most people take courses. You're going to build it instead. Let's create a simple sentiment analyzer that reads customer reviews and classifies them as positive or negative. No machine learning librariesβ€”just Python. 🎯 Define list of positive and negative words In: positive_words = ["good", "great", "excellent", "amazing", "love", "best"] negative_words = ["bad",...