|
1 | 1 | Pandas cookbook
|
2 | 2 | ===============
|
3 | 3 |
|
4 |
| - |
5 |
| -Try it with Jupyter Lite |
6 |
| -[](https://paddymul.github.io/pandas-cookbook/lab/index.html) |
7 |
| - |
| 4 | +Try it in your browser with Jupyter Lite: [](https://jvns.github.io/pandas-cookbook/lab/index.html) |
8 | 5 |
|
9 | 6 | [pandas](http://pandas.pydata.org/) is a Python library for doing
|
10 | 7 | data analysis. It's really fast and lets you do exploratory work
|
@@ -54,40 +51,32 @@ Table of Contents
|
54 | 51 | How to use this cookbook
|
55 | 52 | ========================
|
56 | 53 |
|
57 |
| -The easiest way is to try it out instantly online using Binder's awesome service. **[Start by clicking here](https://mybinder.org/v2/gh/jvns/pandas-cookbook/master)**, wait for it to launch, then click on "cookbook", and you'll be off to the races! It will let you run all the code interactively without having to install anything on your computer. |
| 54 | +You can try it out instantly online using [Jupyter Lite](https://jvns.github.io/pandas-cookbook/lab/index.html), which will run Python with WebAssembly in your browser. |
58 | 55 |
|
59 | 56 | To install it locally, you'll need Jupyter notebook and pandas on your computer.
|
60 | 57 |
|
61 | 58 | You can get these using `pip` (you may want to do this inside a virtual environment to avoid conflicting with your other libraries).
|
62 | 59 |
|
63 | 60 | ```bash
|
64 |
| - pip install -r requirements.txt |
65 |
| -``` |
| 61 | +# Get the repository |
| 62 | +git clone https://github.com/jvns/pandas-cookbook.git |
| 63 | +cd pandas-cookbook |
66 | 64 |
|
67 |
| -This can be difficult to get set up and require you to compile |
68 |
| -a whole bunch of things. I instead use and recommend |
69 |
| -[Anaconda](https://store.continuum.io/), which is a Python distribution which |
70 |
| -will give you everything you need. It's free and open source. |
| 65 | +# Set up a virtual environment |
| 66 | +python3 -m venv venv |
| 67 | +source venv/bin/activate |
71 | 68 |
|
72 |
| -Once you have pandas and Jupyter, you can get going! |
| 69 | +# Install dependencies |
| 70 | +pip install -r requirements.txt |
73 | 71 |
|
74 |
| -```bash |
75 |
| -git clone https://github.com/jvns/pandas-cookbook.git |
76 |
| -cd pandas-cookbook/cookbook |
| 72 | +# Start jupyter |
77 | 73 | jupyter notebook
|
78 | 74 | ```
|
79 | 75 |
|
80 | 76 | A tab should open up in your browser at `http://localhost:8888`
|
81 | 77 |
|
82 | 78 | Happy pandas!
|
83 | 79 |
|
84 |
| -Running Jupyterlite locally |
85 |
| -=========================== |
86 |
| -```bash |
87 |
| -#assuming you checked out into ~/code/pandas-cookbook |
88 |
| -cd ~/code/pandas-cookbook/ ; rm -rf _output ; time jupyter lite build --contents ./cookbook/ && cd _output && python -m http.server |
89 |
| -``` |
90 |
| - |
91 | 80 | Running the cookbook inside a Docker container.
|
92 | 81 | ===============================================================
|
93 | 82 | This repository contains a Dockerfile and can be built into a docker container.
|
|
0 commit comments