Skip to content

Commit badb498

Browse files
committed
Add warning message for lowercols parameter
1 parent 42d9840 commit badb498

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

odm2api/ODM2/services/readService.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,6 +1349,10 @@ def getResultValues(self, resultids, starttime=None, endtime=None, lowercols=Tru
13491349
endtime (object, optional): End time to filter by as datetime object.
13501350
lowercols (bool, optional): Make column names to be lowercase.
13511351
Default to True.
1352+
**Please start upgrading your code to rely on CamelCase column names,
1353+
In a near-future release,
1354+
the default will be changed to False,
1355+
and later the parameter may be removed**.
13521356
13531357
Returns:
13541358
DataFrame: Pandas dataframe of result values.
@@ -1399,6 +1403,12 @@ def getResultValues(self, resultids, starttime=None, endtime=None, lowercols=Tru
13991403
)
14001404
if not lowercols:
14011405
df.columns = [self._get_columns(ResultValues)[c] for c in df.columns]
1406+
else:
1407+
warnings.warn(
1408+
'In a near-future release, '
1409+
'the parameter \'lowercols\' default will be changed to False, '
1410+
'and later the parameter may be removed.',
1411+
DeprecationWarning, stacklevel=2)
14021412
return df
14031413
except Exception as e:
14041414
print('Error running Query: {}'.format(e))

0 commit comments

Comments
 (0)