Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
steinnymir committed Oct 10, 2023
1 parent 22f9471 commit 06ecc80
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sed/core/dfops.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def forward_fill_lazy(
Allows forward filling between partitions. This is useful for dataframes
that have sparse data, such as those with many NaNs.
Runnin the forward filling multiple times can fix the issue of having
Runnin the forward filling multiple times can fix the issue of having
entire partitions consisting of NaNs. By default we run this twice, which
is enough to fix the issue for dataframes with no consecutive partitions of NaNs.
Expand Down Expand Up @@ -186,7 +186,7 @@ def forward_fill_partition(df):
elif not isinstance(before, int):
raise TypeError('before must be an integer or "max"')
# Use map_overlap to apply forward_fill_partition
for i in range(iterations):
for _ in range(iterations):
df = df.map_overlap(
forward_fill_partition,
before=before,
Expand Down
2 changes: 1 addition & 1 deletion sed/loader/flash/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ def parquet_handler(
channels=channels,
before='max',
compute_lengths=True,
iterations=self.config['dataframe'].get('forward_fill_iterations',2),
iterations=self._config['dataframe'].get('forward_fill_iterations', 2),
)
# Remove the NaNs from per_electron channels
dataframe = dataframe.dropna(
Expand Down
2 changes: 1 addition & 1 deletion tests/test_dfops.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def test_forward_fill_lazy_compute():


def test_forward_fill_lazy_keep_head_nans():
""" test that a lazy forward fill works as expected with missing values at the
""" test that a lazy forward fill works as expected with missing values at the
beginning of the dataframe"""
t_df = df.copy()
t_df['energy'][:5] = np.nan
Expand Down

0 comments on commit 06ecc80

Please sign in to comment.