You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let pandas = PyModule::import_bound(py,"pandas")?;
Ideally, we wouldn't incur import costs just for this check, instead we can check if e.g. pandas in sys.modules. If it is, then the import is already paid for, if it isn't, then what we are receiving can't be a pandas Dataframe
The text was updated successfully, but these errors were encountered:
Deleting from sys modules is explicitly documented in the standard library docs as having the potential for causing problems, so no need to handle explicitly (I don't know why you would delete from sys modules unless you're trying to cause problems, this example is a degenerate case pretty clearly).
Right now we do some unconditional imports of pandas/pyarrow from rust:
perspective/rust/perspective-python/src/client/python.rs
Line 145 in 768ca40
perspective/rust/perspective-python/src/client/python.rs
Line 199 in 768ca40
Ideally, we wouldn't incur import costs just for this check, instead we can check if e.g.
pandas
insys.modules
. If it is, then the import is already paid for, if it isn't, then what we are receiving can't be a pandas DataframeThe text was updated successfully, but these errors were encountered: