A
A
Artyom_Kopan2021-08-09 21:57:04
Parsing
Artyom_Kopan, 2021-08-09 21:57:04

How to keep bold when parsing in pandas?

I am writing a parser to search for applicants on the aggregator (I want to know how many of my competitors have already submitted their consent to other universities). The admlist.ru aggregator has a "Other EP" column, and the university to which the applicant has applied is highlighted in bold (for example, admlist.ru/spbu/84dfc6825d54d82d7c23133176f812a1.html).
Here is my parsing code:

import pandas as pd
import requests
import urllib

url = 'http://admlist.ru/spbu/84dfc6825d54d82d7c23133176f812a1.html'
html = requests.get(url).content
df_list_admlist = pd.read_html(html)
admlist = df_list_admlist[-1]
admlist["Другие ОП"][4]


Pandas reads the "Other OPs" column as a regular string.
How can I make it so that the bold font is preserved in this case (or at least that the text from this column is read as html) ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2021-08-10
@Artyom_Kopan

No way, you have to write your own parser.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question