Read individuals from a CSV file - i.e. the same name may appear on more than one row.
Yields pairs of name, info
Loads a set of synonyms from a CSV file. Yields triples of (synonym, accepted name, other fields dict).
*field parameters work like load_taxa.
Load taxa iteratively from a CSV file. It expects fields for name and author to be present, describing the taxa to use. Other fields will be stored as a dictionary in each taxon’s .info property.
If authfield is set to True, it will attempt to parse names in the namefield to names and authorities. If authfield is None, no authfield will be used.
progress is an object used by the GUI to track progress. It is called periodically with the number of bytes read.
Any other arguments are passed to the csv.DictReader object–see Python’s documentation.
Load a TaxonSet representing the individuals in the CSV file. Each name may appear on several rows.
Loads a set of synonyms from a CSV file. Returns a TaxonSet containing the taxa.
*field parameters work like load_taxa.
If get_info is True (the default), extra info from the lines with the accepted names is attached to the taxa.
Load a TaxonSet from a CSV file. It expects fields for name and author to be present, describing the taxa to use. Other fields will be stored as a dictionary in each taxon’s .info property.
Any other arguments are passed to the csv.DictReader object–see Python’s documentation.
Save records of individuals (e.g. specimens, sightings) from a TaxonSet.
This requires a collection which can be iterated more than once.
Writes a set of synonyms to a CSV file. (This only uses the synonyms in the .othernames property of each Taxon, not the names in the TaxonSet’s index.
Writes a TaxonSet to a CSV file. Accepted name and author will be recorded, along with any fields specified from .info.
If info_fields is True, all fields will be saved. If write_distribution is None, distribution will be saved if any data is present. Both of these options need a collection of taxa which can be iterated over more than once.
This modules is for loading and saving taxa in the JSON lines format. This is a modification of JSON where a series of JSON items are stored line by lines, allowing them to be decoded individually, without having to hold the entire object in memory.
Loads taxa from a JSON lines file, iterating over them, without keeping the entire set in memory.
Load a TaxonSet from a JSON lines file.
Saves a TaxonSet (or any iterable source of taxa) to the given handle, in JSON lines format.
Saves a single taxon to the given file. Can be called repeatedly to save successive taxa.