Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

markdown-parsing-tests.md 897 B

You have to be logged in to leave a comment. Sign In
jupytext kernelspec
[{formats ipynb,md:myst} {text_representation [{extension .md} {format_name myst} {format_version 0.13} {jupytext_version 1.11.5}]}] [{display_name Python [conda env:text-data-class]} {language python} {name conda-env-text-data-class-py}]
import pandas as pd
import datatest as dt
from pathlib import Path
print(Path('fixture.md').read_text())
gold = pd.read_csv('output.csv')
def test_md_df(df):
    levels=gold.level.tolist()
    contents = gold.content.tolist()
    titles = gold.title.tolist()
    
    dt.validate(df.columns, gold.columns.tolist())
    dt.validate(df.level, levels)
    dt.validate(df.title, titles)
    dt.validate(df.content, contents)
    
    print('all good!')
gold
test_md_df(gold)

Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...