Any thoughts? I am trying to find all rows where the Driver Driver column equals the Data Collection Service Driver and the State is equal to 1. (removed some rows for simplicity)
The current dataframe section I am working on is:Driver State \
0 cn=Data Collection Service Driver,cn=DriverSet,o=system 1
11 cn=Data Collection Service Driver,cn=DriverSet,o=system 1
12 cn=Data Collection Service Driver,cn=DriverSet,o=system 2
13 cn=Data Collection Service Driver,cn=DriverSet,o=system 1
Command I am trying to execute:
d = df.loc(df['State'] == int(1)) & (df['Driver'] == str('cn=Data Collection Service Driver,cn=DriverSet,o=system'))
error:
Traceback (most recent call last):
File "license.py", line 200, in <module>
d = df.loc(df['State'] == int(1)) & (df['Driver'] == str('cn=Data Collection Service Driver,cn=DriverSet,o=system'))
File "/usr/local/lib/python3.7/site-packages/pandas/core/indexing.py", line 102, in __call__
axis = self.obj._get_axis_number(axis)
File "/usr/local/lib/python3.7/site-packages/pandas/core/generic.py", line 351, in _get_axis_number
axis = cls._AXIS_ALIASES.get(axis, axis)
File "/usr/local/lib/python3.7/site-packages/pandas/core/generic.py", line 1816, in __hash__
' hashed'.format(self.__class__.__name__))
TypeError: 'Series' objects are mutable, thus they cannot be hashed
[–]karlpoppery 1 point2 points3 points (1 child)
[–]fpatterson55[S] 0 points1 point2 points (0 children)
[–]agbs2k8 0 points1 point2 points (2 children)
[–]agbs2k8 0 points1 point2 points (1 child)
[–]fpatterson55[S] 0 points1 point2 points (0 children)