Untitled
unknown
plain_text
a year ago
1.4 kB
6
Indexable
244 ):
245 data = pd.Series(program_text)
--> 246 program_name = data.astype(str).str.extract(pat=r'PROGRAM-ID[\.\s]{0,10}(\b\w+)').dropna().iloc[0].item()
247 data = [i for i in data if i.strip()!=""]
248 data = [line[7:72].strip('\n').rstrip() for line in data if len(line)>6 and line[6] not in ['*', '/','\n','EJECT']]
~/.local/lib/python3.7/site-packages/pandas/core/indexing.py in __getitem__(self, key)
929
930 maybe_callable = com.apply_if_callable(key, self.obj)
--> 931 return self._getitem_axis(maybe_callable, axis=axis)
932
933 def _is_scalar_access(self, key: tuple):
~/.local/lib/python3.7/site-packages/pandas/core/indexing.py in _getitem_axis(self, key, axis)
1564
1565 # validate the location
-> 1566 self._validate_integer(key, axis)
1567
1568 return self.obj._ixs(key, axis=axis)
~/.local/lib/python3.7/site-packages/pandas/core/indexing.py in _validate_integer(self, key, axis)
1498 len_axis = len(self.obj._get_axis(axis))
1499 if key >= len_axis or key < -len_axis:
-> 1500 raise IndexError("single positional indexer is out-of-bounds")
1501
1502 # -------------------------------------------------------------------
IndexError: single positional indexer is out-of-boundsEditor is loading...
Leave a Comment