A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pandas-dev/pandas/issues/3867 below:

json round trip exception · Issue #3867 · pandas-dev/pandas · GitHub

This csv (from the baseball database) reads ok to a DataFrame, pastes ok to a json.

In [6]: df = pd.read_csv('https://raw.github.com/hayd/lahman2012/master/csvs/Teams.csv')

In [7]: s = df.to_json()

In [8]: pd.read_json(s)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-8-ebde42cd0695> in <module>()
----> 1 pd.read_json(s)

/Users/234BroadWalk/pandas/pandas/io/json.pyc in read_json(path_or_buf, orient, typ, dtype, numpy, parse_dates, keep_default_dates)
    158     obj = None
    159     if typ == 'frame':
--> 160         obj = FrameParser(json, orient, dtype, numpy, parse_dates, keep_default_dates).parse()
    161
    162     if typ == 'series' or obj is None:

/Users/234BroadWalk/pandas/pandas/io/json.pyc in parse(self)
    185
    186     def parse(self):
--> 187         self._parse()
    188         if self.obj is not None:
    189             self._convert_axes()

/Users/234BroadWalk/pandas/pandas/io/json.pyc in _parse(self)
    284             try:
    285                 if orient == "columns":
--> 286                     args = loads(json, dtype=dtype, numpy=True, labelled=True)
    287                     if args:
    288                         args = (args[0].T, args[2], args[1])

TypeError: long() argument must be a string or a number, not 'NoneType'

cc #3804


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4