[Swlug] help with text manipulation

bascule asura at theexcession.co.uk
Thu Jun 21 15:58:38 UTC 2018


On Thursday, 21 June 2018 16:29:26 BST bascule via Swlug wrote:
> however i got a message about no pandas, checked my package manager (urpmi
> in mageia6) installed python3-pandas and still got the message,
> should i install the alternative python-pandas,  i know i can use pip (i
> think that's what it is called) but i'm wary of libraries being installed
> two different ways
ok i got it,  needed to do:
python3 ~/bin/bascules_json_dedup.py

however i get the following, would it the python install or the input file?
Traceback (most recent call last):
  File "/home/bascule/bin/bascules_json_dedup.py", line 7, in <module>
    dataframe = pd.read_json('cabin_scrap_profile.json')
  File "/usr/lib64/python3.5/site-packages/pandas/io/json.py", line 211, in 
read_json
    date_unit).parse()
  File "/usr/lib64/python3.5/site-packages/pandas/io/json.py", line 279, in 
parse
    self._parse_no_numpy()
  File "/usr/lib64/python3.5/site-packages/pandas/io/json.py", line 496, in 
_parse_no_numpy
    loads(json, precise_float=self.precise_float), dtype=None)
  File "/usr/lib64/python3.5/site-packages/pandas/core/frame.py", line 223, in 
__init__
    mgr = self._init_dict(data, index, columns, dtype=dtype)
  File "/usr/lib64/python3.5/site-packages/pandas/core/frame.py", line 359, in 
_init_dict
    return _arrays_to_mgr(arrays, data_names, index, columns, dtype=dtype)
  File "/usr/lib64/python3.5/site-packages/pandas/core/frame.py", line 5240, 
in _arrays_to_mgr
    index = extract_index(arrays)
  File "/usr/lib64/python3.5/site-packages/pandas/core/frame.py", line 5291, 
in extract_index
    raise ValueError('Mixing dicts with non-Series may lead to '
ValueError: Mixing dicts with non-Series may lead to ambiguous ordering.

bascule






More information about the Swlug mailing list