Skip to content

Updated fill_na_rows function in clean_data.py #24

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions quickda/clean_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def fill_na_rows(data):
# Retrieve the list of columns having nulls and interpolate for each column
na_columns = df.columns[df.isna().any()].tolist()
for column in na_columns:
df[column] = df[column].interpolate(method='pad', limit_direction='forward')
df[column] = df[column].interpolate(method='linear', limit_direction='both')

return df

Expand Down Expand Up @@ -185,4 +185,4 @@ def clean(data, method="default", columns=[], dtype="numeric", to_replace="", va

except Exception as e:
print(e)
return data
return data