Timelink Python package

Contents:

  • The Timelink python package
  • Installation
  • Usage
  • Documentation
  • Timelink source documentation
    • timelink package
      • get_latest_version()
      • Subpackages
        • timelink.api package
        • timelink.app package
        • timelink.kleio package
        • timelink.mhk package
        • timelink.migrations package
        • timelink.networks package
        • timelink.notebooks package
        • timelink.pandas package
        • timelink.static package
        • timelink.statics package
      • Submodules
      • timelink.cli module
      • timelink.timelink module
  • Contributing
  • Credits
  • History
Timelink Python package
  • Timelink source documentation
  • timelink package
  • timelink.pandas package
  • View page source

timelink.pandas package

Submodules

timelink.pandas.attribute_values module

Create a dataframe with the values of an attribute

timelink.pandas.attribute_values.attribute_values(attr_type, groupname=None, dates_between=None, db: TimelinkDatabase | None = None, sql_echo=False)[source]

Return the vocabulary of an attribute

The returned dataframe has a row for each unique value a ‘count’ with the number of different entities, and the the first and last date for that row

Parameters:
  • for (attr_type = attribute type to search)

  • by (groupname = groupname to filter)

  • use (db = database connection to)

  • specified (either db or session must be)

  • yyyy-mm-dd (dates_between = tuple with two dates in format)

  • statement (sql_echo = if true will print the sql)

To filter by dates: dates_in = (from_date,to_date) with dates in format yyyy-mm-dd will return attributes with from_date < date < to_date

timelink.pandas.name_to_df module

timelink.pandas.name_to_df.pname_to_df(name, db: TimelinkDatabase | None = None, session=None, similar=False, name_particles=None, sql_echo=False)[source]

name_to_df return df of people with a matching name

Parameters:
  • name – name to search for

  • db – = database connection to use, either db or session must be specified

  • session – session to use, either db or session must be specified

  • similar – if true will strip particles and insert a wild card % between name components with an extra one at the end

  • name_particles – list, particles to remove before comparing names

Previous Next

© Copyright 2024, Joaquim Ramos de Carvalho.

Built with Sphinx using a theme provided by Read the Docs.