Data FrameΒΆ

Example

>>> from techminer2.metrics.trending_terms.user import DataFrame
>>> # Create, configure, and run the DataFrame generator
>>> generator = (
...     DataFrame()
...     #
...     # FIELD:
...     .with_field("author_keywords_raw")
...     .having_terms_in_top(20)
...     .having_terms_ordered_by("OCC")
...     .having_term_occurrences_between(None, None)
...     .having_term_citations_between(None, None)
...     .having_terms_in(None)
...     #
...     # TIME WINDOW:
...     .with_time_window(2)
...     #
...     # DATABASE:
...     .where_root_directory("examples/fintech/")
...     .where_database("main")
...     .where_record_years_range(None, None)
...     .where_record_citations_range(None, None)
...     .where_records_match(None)
... )
>>> df = generator.run()
>>> df.head()
                      rank_occ  ...  average_docs_per_year
author_keywords_raw             ...
FINTECH                      1  ...                    9.0
INNOVATION                   2  ...                    0.5
FINANCIAL_SERVICES           3  ...                    1.5
FINANCIAL_INCLUSION          4  ...                    0.0
FINANCIAL_TECHNOLOGY         5  ...                    1.0

[5 rows x 22 columns]