From 24252976cdfca3f9bbc68abd4de3737124de9344 Mon Sep 17 00:00:00 2001 From: jdebacker Date: Fri, 22 Mar 2024 21:52:47 -0400 Subject: [PATCH] avoid long lines --- microdf/generic.py | 8 ++++++-- microdf/io.py | 7 ++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/microdf/generic.py b/microdf/generic.py index a22e2b5..86149b7 100644 --- a/microdf/generic.py +++ b/microdf/generic.py @@ -661,7 +661,9 @@ def equals(self, other) -> bool: @get_args_as_micro_series() def groupby(self, by: Union[str, list], *args, **kwargs): - """Returns a GroupBy object with MicroSeriesGroupBy objects for each column + """ + Returns a GroupBy object with MicroSeriesGroupBy objects for + each column :param by: column to group by :type by: Union[str, list] @@ -766,7 +768,9 @@ def poverty_count( income: Union[MicroSeries, str], threshold: Union[MicroSeries, str], ) -> int: - """Calculates the number of entities with income below a poverty threshold. + """ + Calculates the number of entities with income below a poverty + threshold. :param income: income array or column name :type income: Union[MicroSeries, str] diff --git a/microdf/io.py b/microdf/io.py index f3fd27b..a7d5d67 100644 --- a/microdf/io.py +++ b/microdf/io.py @@ -3,7 +3,12 @@ import requests import pandas as pd -HEADER = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36'} +HEADER = { + "User-Agent": + "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) " + + "AppleWebKit/537.36 (KHTML, like Gecko) " + + "Chrome/50.0.2661.102 Safari/537.36" + } def read_stata_zip(url: str, **kwargs) -> pd.DataFrame: