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
Is it possible to run a calculation on a single sample rather than a pandas dataframe? I'd like to use PySulfSat in some code I am working on, in which an SCSS calculation is called periodically by other routines. Unless I am mistaken, the current implementation of PySulfSat would require that I put my sample composition into an appropriately styled pandas dataframe each time I want to do an SCSS calculation, which is a bit cumbersome. Is there a current implementation for single samples that I missed?
If the answer is that you must use a dataframe, is there a danger or loss of functionality passing in a self-made dataframe rather than importing a file (e.g., does the import of a file create an object that has other attributes)?
The text was updated successfully, but these errors were encountered:
That isnt supported at present - I used dataframes because at the time of making I was more focused on applying it to 1000s of rows of data vs. a single composition as needed for a degassing model.
The most straightforward thing to do for now would be to pass it into the dataframe format I use. If this creates a significant speed penalty I can try to edit the code.
The import function is called import_dataframe and is in the import_data.py file.
The code uses these columns (which can be filled with 0s if not present).
Any other columns are kept but ignored. At present the output is appended onto the input dataframe, but that would be an easy fix to have an option to return a pandas.Series or even just a float if you wanted that instead
Is it possible to run a calculation on a single sample rather than a pandas dataframe? I'd like to use PySulfSat in some code I am working on, in which an SCSS calculation is called periodically by other routines. Unless I am mistaken, the current implementation of PySulfSat would require that I put my sample composition into an appropriately styled pandas dataframe each time I want to do an SCSS calculation, which is a bit cumbersome. Is there a current implementation for single samples that I missed?
If the answer is that you must use a dataframe, is there a danger or loss of functionality passing in a self-made dataframe rather than importing a file (e.g., does the import of a file create an object that has other attributes)?
The text was updated successfully, but these errors were encountered: