Extracting room numbers from a ‘Description’ column in a DataFrame using regular expressions:
Import the re module:
1 2 3 4 5 6 7 8 9 10 11 12
import re ````
2. Define a function to extract the room number from a description:
```python defextract_room_number(description): match = re.search(r'(\d+\.\d+|\d+)(?=\s+of which are bedrooms)', description) ifmatch: returnfloat(match.group(1)) else: returnNone
Use the apply() method to apply the function to the ‘Description’ column and create a new ‘RoomNumber’ column:
magma-nvim Magma is a NeoVim plugin for running code interactively with Jupyter.
Jupynium
Jupynium.nvim It’s just like a markdown live preview, but it’s Jupyter Notebook live preview!
Jupynium uses Selenium to automate Jupyter Notebook, synchronising everything you type on Neovim. Never leave Neovim. Switch tabs on the browser as you switch files on Neovim.