Skip to content

Commit 32519f6

Browse files
committed
Update docstrings
1 parent baee8b5 commit 32519f6

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

odm2api/ODM2/services/readService.py

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,18 +1274,26 @@ def getResultDerivationEquations(self):
12741274
"""
12751275
return self._session.query(ResultDerivationEquations).all()
12761276

1277-
# Results
1278-
# ResultValues
12791277
def getResultValues(self, resultids, starttime=None, endtime=None):
12801278
"""
1281-
getResultValues(self, resultids, starttime=None, endtime=None)
1282-
* Pass in a list of ResultID - Returns a pandas dataframe object of type
1283-
that is specific to the result type - The resultids must be associated
1284-
with the same value type
1285-
* Pass a ResultID and a date range - returns a pandas dataframe object
1286-
of type that is specific to the result type with values between the input date range
1287-
* Pass a starttime - Returns a dataframe with the values after the given start time
1288-
* Pass an endtime - Returns a dataframe with the values before the given end time
1279+
Retrieve result values associated with the given result.
1280+
1281+
**The resultids must be associated with the same result type**
1282+
Args:
1283+
resultids (list): List of SamplingFeatureIDs.
1284+
starttime (object, optional): Start time to filter by as datetime object.
1285+
endtime (object, optional): End time to filter by as datetime object.
1286+
1287+
Returns:
1288+
DataFrame: Pandas dataframe of result values.
1289+
1290+
Examples:
1291+
>>> READ = ReadODM2(SESSION_FACTORY)
1292+
>>> READ.getResultValues(resultids=[10, 11])
1293+
>>> READ.getResultValues(resultids=[100, 20, 34], starttime=datetime.today())
1294+
>>> READ.getResultValues(resultids=[1, 2, 3, 4],
1295+
>>> starttime=datetime(2000, 01, 01),
1296+
>>> endtime=datetime(2003, 02, 01))
12891297
12901298
"""
12911299
restype = self._session.query(Results).filter_by(ResultID=resultids[0]).first().ResultTypeCV

0 commit comments

Comments
 (0)