MCPcopy Create free account
hub / github.com/datacamp/pythonwhat / get_manual_converters

Function get_manual_converters

pythonwhat/converters.py:5–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3
4
5def get_manual_converters():
6
7 converters = {
8 "pandas.io.excel.ExcelFile": lambda x: x.io,
9 "pandas.io.excel._base.ExcelFile": lambda x: x.io,
10 "builtins.dict_keys": lambda x: sorted(x),
11 "builtins.dict_items": lambda x: sorted(x),
12 "bs4.BeautifulSoup": lambda x: str(x),
13 "bs4.element.Tag": lambda x: str(x),
14 "bs4.element.NavigableString": lambda x: str(x),
15 "bs4.element.ResultSet": lambda x: [str(res) for res in x],
16 "h5py._hl.files.File": lambda x: x.file.filename,
17 "h5py._hl.group.Group": lambda x: x.file.filename
18 + "_"
19 + str([x for x in x.keys()]),
20 "sqlalchemy.engine.base.Engine": lambda x: x.url.database,
21 }
22
23 return converters

Callers 1

__init__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected