Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing python json module #1518

Closed
aeshna-cyanea opened this issue Mar 17, 2025 · 3 comments
Closed

missing python json module #1518

aeshna-cyanea opened this issue Mar 17, 2025 · 3 comments

Comments

@aeshna-cyanea
Copy link

aeshna-cyanea commented Mar 17, 2025

Describe the problem to be solved

the formula docs promise access to the python standard library, but to my chagrin i could not load/process a column with json data from within a formula by using python's built in json.loads() function.

Describe the solution you would like

enable reading json!

@paulfitz
Copy link
Member

Hi @aeshna-cyanea, you just need to import the module you need, for example this is a valid formula:

import json
json.loads("22")

@aeshna-cyanea
Copy link
Author

aeshna-cyanea commented Mar 17, 2025

apologies! wires must have crossed in my brain because regular expressions work in formulas without needing imports so i thought it applied to other modules

@paulfitz
Copy link
Member

Makes sense @aeshna-cyanea, the "data engine" implementing formulas uses a few modules itself so those are already imported. I can see how that's confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants