<jupyter_start><jupyter_text>Test TU_Util()<jupyter_code>import matplotlib 
from matplotlib import style
%matplotlib inline
style.use('ggplot')

# This is to import custom-made modules
# This can be removed after making these modules a real library
import os, sys
lib_path = os.path.abspath(os.path.join('..', 'building-analytics')) # relative path of the source code in Box Folder 
sys.path.append(lib_path)

from TS_Util_Clean_Data import *

# inputs
fileName = "test_marco.csv" # replace with other files used
folder = "../test1"

## call script

# instantiate class
TSU = TS_Util()

# load data
data= TSU.load_TS(fileName, folder)

data.head()
data= TSU.remove_start_NaN(data)
data.head()
# clean start-end
data= TSU.remove_end_NaN(data)
data.tail()
TSU._find_missing(data).head()
TSU.display_missing(data, how="all")
TSU.count_missing(data, how="number")
TSU.remove_missing(data,how="any").head()
TSU._find_outOfBound(data, 10, 300).head()
TSU.display_outOfBound(data, 10, 300)
TSU.count_outOfBound(data, 10, 300)
TSU.remove_outOfBound(data, 10, 350)
TSU.display_outliers(data,method="std",coeff=2, window=10)
TSU.display_outliers(data,method="rstd",coeff=1, window=10)
TSU.display_outliers(data,method="rmedian",coeff=1, window=10)
TSU.display_outliers(data,method="iqr",coeff=1, window=10)
TSU.display_outliers(data,method="qtl",coeff=1, window=10)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14151624548736463, 'fraction_numerical': 0.025992779783393503, 'mean_word_length': 7.4, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '526007', 'license': 'MIT', 'n_tokens_mistral': 555, 'n_tokens_neox': 522, 'n_words': 104, 'path': 'building-analytics/.ipynb_checkpoints/test_clean_data-checkpoint.ipynb', 'repo_name': 'phgupta/Building-Energy-Data', 'size': '1385'}