[Memo] Display Jupyter Notebook on PC in monospaced font (Mac)

Introduction

The Jupyter Notebook that runs on a PC has proportional fonts by default, so the output is jerky and inconvenient. Here are the steps to change this to a monospaced font. I have confirmed the operation on Mac.

procedure

Launch a terminal and execute the following command.

$ cd ~/.jupyter
$ mkdir custom
$ cd custom
$ echo '.CodeMirror pre, .output pre { font-family: Monaco, monospace; }' > custom.css

In this state

$ Jupiter notebook

Then the numpy matrix will also look nice as follows:

スクリーンショット 2020-09-25 9.29.39.png

For your reference, the above code is a part of the training code of my book "Making a profitable AI with Python". If you are interested, please refer to the link below, including other codes.

https://github.com/makaishi2/profitable_ai_book_info/blob/master/refs/notebooks.md

Recommended Posts

[Memo] Display Jupyter Notebook on PC in monospaced font (Mac)
Display HTML in Jupyter notebook
Unable to display tensorboard in jupyter notebook on docker (solved)
Try running Jupyter Notebook on Mac
GPU check of PC on jupyter notebook
Display histogram / scatter plot on Jupyter Notebook
[Jupyter Notebook memo] Display kanji with matplotlib
Jupyter Notebook memo
I want to display an image on Jupyter Notebook using OpenCV (mac)
Install matplotlib and display graph on Jupyter Notebook
Simply display a line graph on Jupyter Notebook
jupyter notebook does not start on mac fish
Display PIL images on Jupyter
Multiprocessing error in Jupyter Notebook
High charts on Jupyter notebook
View PDF on Jupyter Notebook
Write charts in real time with Matplotlib on Jupyter notebook
Memo on Mac OS X
View dynamic graphs in Jupyter notebook. (Inline display of D3.js)
Run Jupyter Notebook on windows
VScode environment construction (on Mac) & graph display in Python (@browser)
Resolve garbled Japanese characters in matplotlib of Jupyter Notebook on Docker
Real-time display of video acquired from webcam on Jupyter notebook (Python3)
Install Anaconda on Mac and upload Jupyter (IPython) notebook to Anaconda Cloud
Formatting with autopep8 on Jupyter notebook
Python memo Anaconda x Jupyter Notebook
Generate Jupyter notebook ".ipynb" in Python
Python environment construction memo on Mac
Run azure ML on jupyter notebook
[MEMO] [Development environment construction] Jupyter Notebook
View graphs inline in Jupyter Notebook
Memory leak in Python Jupyter Lab (Notebook)?
Make Jupyter Notebook a service on CentOS
Try SVM with scikit-learn on Jupyter Notebook
Start jupyter notebook on GPU server (remote server)
How to execute commands in jupyter notebook
Display the graph of tensorBoard on jupyter
Clone the github repository on jupyter notebook
Build jupyter notebook on remote server (CentOS)
Use vim keybindings on Docker-launched Jupyter Notebook
Run Jupyter notebook on a remote server
Build a PYNQ environment on Ultra96 V2 and log in to Jupyter Notebook
How to make the font width of jupyter notebook put in pyenv equal width