Skip to content

Commit

Permalink
Merge pull request #7 from Greg-S-12/greg_branch
Browse files Browse the repository at this point in the history
initial analysis for first test
  • Loading branch information
Greg-S-12 authored Nov 12, 2019
2 parents 4b30af0 + 11eb15e commit 34a82a4
Show file tree
Hide file tree
Showing 4 changed files with 776 additions and 1,005 deletions.
31 changes: 31 additions & 0 deletions CleaningFunctions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
"""
Each support function should have an informative name and return the partially cleaned bit of the dataset.
"""
import pandas as pd


# def search(dataframe, column_to_search, condition, columns):

# dataframe=df

# new_df=df.loc[df[columns_to_search]condition,columns]

# return new_df

class Clean():

def __init__(self,name):
self.name=name


def rename_columns(self,columns,new_names):
for column,name in list(zip(columns,new_names)):
dataframe.rename(columns={column:name},inplace=True)
return dataframe

# def drop_nulls(dataframe,column_to_search):
# # The null values in our dataframe are listed as "\N"
# df=dataframe
# df.loc[df[column_to_search]==r"\N"]


Loading

0 comments on commit 34a82a4

Please sign in to comment.