diff --git a/pandas/core/generic.py b/pandas/core/generic.py index bae85aa84a96e..16b3176521e28 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -539,25 +539,27 @@ def to_json(self, path_or_buf=None, orient=None, date_format='epoch', ---------- path_or_buf : the path or buffer to write the result string if this is None, return a StringIO of the converted string - orient : + orient : string - Series : - default is 'index' - allowed values are: {'split','records','index'} + * Series - DataFrame : - default is 'columns' - allowed values are: {'split','records','index','columns','values'} + - default is 'index' + - allowed values are: {'split','records','index'} - The format of the JSON string - split : dict like - {index -> [index], columns -> [columns], data -> [values]} - records : list like [{column -> value}, ... , {column -> value}] - index : dict like {index -> {column -> value}} - columns : dict like {column -> {index -> value}} - values : just the values array + * DataFrame - date_format : type of date conversion (epoch = epoch milliseconds, iso = ISO8601), + - default is 'columns' + - allowed values are: {'split','records','index','columns','values'} + + * The format of the JSON string + + - split : dict like {index -> [index], columns -> [columns], data -> [values]} + - records : list like [{column -> value}, ... , {column -> value}] + - index : dict like {index -> {column -> value}} + - columns : dict like {column -> {index -> value}} + - values : just the values array + + date_format : type of date conversion (epoch = epoch milliseconds, iso = ISO8601) default is epoch double_precision : The number of decimal places to use when encoding floating point values, default 10.