Created
September 24, 2024 03:14
-
-
Save ag-chirag/982b5be20b23236c4954ed0cefccae6f to your computer and use it in GitHub Desktop.
Util method to convert DataCommons response to markdown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@staticmethod | |
def pretty_print(q2resp: dict[str, dg.base.DataCommonsCall]): | |
markdown_output = "# Data Commons Response\n" | |
for k, v in q2resp.items(): | |
markdown_output += f"**{k}**\n\n" | |
markdown_output += f"{v.answer()}\n\n" | |
return markdown_output |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment