watex.geology.core.get_agso_properties#
- watex.geology.core.get_agso_properties(config_file=None, orient='series')[source]#
Get the geostructures files from <’watex/etc/’> and set the properties according to the desire type. When orient is
seriesit will return a dictionnary with key equal to properties name and values are the properties items.- Parameters:
config_file – Path_Like or str Can be any property file provided that its obey the disposal of property files found in AGSO_PROPERTIES.
orient – string value, (‘dict’, ‘list’, ‘series’, ‘split’, ‘records’, ‘’index’) Defines which dtype to convert Columns(series into).For example, ‘list’ would return a dictionary of lists with Key=Column name and Value=List (Converted series). For furthers details, please refer to https://www.geeksforgeeks.org/python-pandas-dataframe-to_dict/
- Example:
>>> import watex.geology.core import get_agso_properties >>> data=get_agso_properties('watex/etc/AGSO_STCODES.csv') >>> code_descr={key:value for key , value in zip (data["CODE"], data['__DESCRIPTION'])}