# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# # "Online general resources on microscopy"
# > "Online general resources on microscopy"
# - toc: true 
# - badges: false
# - comments: false
# - logoimage: "https://raw.githubusercontent.com/guiwitz/blog/master/images/mic_logo.png"

#hide
import warnings
warnings.filterwarnings("ignore")
import pandas as pd
from IPython.display import display, Markdown, Latex, HTML

# +
#hide
mic = pd.read_excel('microscopy_online.xlsx',skiprows=1,header = 1)

#reomove empty lines
toremove = []
for i in range(len(mic)):
    if pd.isna(mic.iloc[i].Subject):
        toremove.append(i)
mic = mic.drop(labels=toremove)

#split tables by categories
tosplit = []
for i in range(len(mic)):
    if pd.isna(mic.iloc[i].Description):
        tosplit.append(i)
pd_list = []
names = []
for i in range(len(tosplit)-1):
    names.append(mic.iloc[tosplit[i]].Subject)
    pd_list.append(mic.iloc[tosplit[i]+1:tosplit[i+1]])
    
# -

#hide_input
pd.set_option('display.max_colwidth', -1)
#display(Markdown('# Online general resources on microscopy'))
for x in range(len(names)):
    display(Markdown('## '+names[x]))
    display(HTML(pd_list[x].to_html(
        render_links=True,
        max_rows = None,
        index = False,
        na_rep = ''
    )))



StarcoderdataJupyterScriptsDedupFiltered