(inspired by this discussion)
Instead of {{ read_csv('table.csv') }} we could take inspiration from https://github.com/coddingtonbear/obsidian-csv-table and create a custom superfences notation like so:
```table-reader
filepath: table.csv
```
We could add the following extra options:
reader (str) one of the pandas functions, like read_csv
keyword_arguments, a dictionary, with named arguments, for example encoding: 'utf-8'
filter (list of strings), where each is successively passed to .query()
sortBy (list of strings), passed to pandas's .sort_values()
maxRows (int), passed to pandas's .head()
columnVariables (list of strings), passed to pandas's .rename()`
You can already do all this by just using a mkdocs hook to preprocess tables.
So if you read this & have a use-case for this, let me know!
(inspired by this discussion)
Instead of
{{ read_csv('table.csv') }}we could take inspiration from https://github.com/coddingtonbear/obsidian-csv-table and create a custom superfences notation like so:We could add the following extra options:
reader(str) one of the pandas functions, likeread_csvkeyword_arguments, a dictionary, with named arguments, for exampleencoding: 'utf-8'filter(list of strings), where each is successively passed to.query()sortBy(list of strings), passed to pandas's.sort_values()maxRows(int), passed to pandas's.head()columnVariables(list of strings), passed topandas's.rename()`You can already do all this by just using a mkdocs hook to preprocess tables.
So if you read this & have a use-case for this, let me know!