Skip to content

Instantly share code, notes, and snippets.

@juanluisrto
juanluisrto / conda2jupyter.sh
Last active July 27, 2022 15:48
Using conda environment in jupyter notebook
# run from the environment you want to add to jupyter.
# --name myenv is just the internal name ipykernel gives to the kernel
source activate myenv
python -m ipykernel install --user --name myenv --display-name "Python (myenv)"
import pandas as pd, os, shutil
df = pd.read_excel("Free+English+textbooks.xlsx")
for cat in df["English Package Name"].unique():
os.mkdir("download/" + cat)
for index, row in df.iterrows():
category = row.loc["English Package Name"]
file_name = f"{row.loc['Book Title']}_{row.loc['Edition']}".replace('/','-').replace(':','-')