navis 1.4.0
  • Install
  • Quickstart
  • Tutorials
  • API
  • Changelog
  • Github
  • Ecosystem
  • Site
    • Page
        • navis.write_json
          • write_json()

    navis.write_json¶

    navis.write_json(x, filepath, **kwargs)[source]¶

    Save neuron(s) to json-formatted file.

    Nodes and connectors are serialised using pandas’ to_json(). Most other items in the neuron’s __dict__ are serialised using json.dumps(). Properties not serialised: .graph, .igraph.

    Parameters:
    • x (TreeNeuron | NeuronList) – Neuron(s) to save.

    • filepath (str, optional) – File to save data to. If None will return a json-formatted string.

    • **kwargs – Parameters passed to json.dumps() and pandas.DataFrame.to_json().

    Returns:

    Only if filepath=None.

    Return type:

    str

    See also

    read_json()

    Read json back into navis neurons.

    Back to top

    Source

    © Copyright 2018, Philipp Schlegel.
    Created using Sphinx 5.3.0.