Closed timvink closed 9 months ago
Another alternative to document (and give pros and cons) is to use https://pypi.org/project/markdown-exec/ like this:
```python exec="true"
import pandas as pd
file_path = "path/to/file/from/project/root"
print(pd.read_csv(file_path).to_markdown(index=False, disable_numparse=True))
There are other patterns that might fit a use-case better than using this plugin. Let's describe when those might be more suited.
For example, you could write markdown tables into separate
.md
files somewhere, and load them where you need them using the snippets extension. Easy, fast, low on dependencies and great when seeing changes in version control. But not as flexible, does not supports CSVs and other formats, if you move the table you have to update the path all the time, etc.