geost.pandas_dataframe#
- geost.pandas_dataframe(*args: Any, **kwargs: Any) DataFrame[source]#
Convenience function to create a pandas DataFrame that is compatible with the
.gstaccessor without explicitly having toimport pandas. The DataFrame you want to create should at least have a survey ID column, otherwise a MissingSurveyIDError is raised because the result would not be compatible with the.gstaccessor.- Parameters:
*args (Any) – Any positional or keyword arguments passed to
pd.DataFrame, see the Pandas documentation for more details.**kwargs (Any) – Any positional or keyword arguments passed to
pd.DataFrame, see the Pandas documentation for more details.
- Returns:
A pandas DataFrame that is compatible with the
.gstaccessor.- Return type:
pd.DataFrame
Examples
>>> import geost >>> df = geost.pandas_dataframe( ... { ... "nr": ["A", "A", "B", "B"], ... "top": [0, 0.5, 0, 0.5], ... "bottom": [0.5, 1, 0.5, 1], ... "lith": ["sand", "clay", "sand", "clay"], ... } ... ) >>> df nr top bottom lith 0 A 0.0 0.5 sand 1 A 0.5 1.0 clay 2 B 0.0 0.5 sand 3 B 0.5 1.0 clay