Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing function trim_all_columns(df) #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ericbrasiln
Copy link

Hello, @e-maud

I am researching interfaces of digitized newspapers in the Portuguese language as part of my postdoctoral research at the DH_Lab of the Universidade Nova de Lisboa.

This is an extension of previous research on the Hemeroteca Digital Brasileira (Digital Newspaper Library of Brazil) at the National Library of Brazil.

Your paper 'Historic Newspaper User Interfaces: A Review (2019)' has served as a methodological foundation for the analysis of the interfaces of digital newspaper libraries in Brazil and Portugal. I would like to express that it is an incredible work and an inspiration for my reflections, as well as the entire work of the impresso project.

While attempting to execute the notebook to analyze the TSV, I noticed that in the current version, the function trim_all_columns(df) is missing both in the .ipynb file and in the interface/radar_factory.py file.

It was present in an earlier version of the .ipynb file, which can be seen here: link to GitHub

The function is as follows:

def trim_all_columns(df):
    """
    Trim whitespace from ends of each value across all series in dataframe
    """
    trim_strings = lambda x: x.strip() if type(x) is str else x
    return df.applymap(trim_strings)

I have included the function in the file interface/radar_factory.py, as in the .ipynb file, it is being imported from interface.radar_factory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant