<jupyter_start><jupyter_text>Video Data File의 Max Frame<jupyter_code>max_length = np.max(length)
max_length
min_length = np.min(length)
min_length<jupyter_output><empty_output><jupyter_text>Max Length의 길에 맞춰셔 전체 Data를 다시 만든다.<jupyter_code>def add_dummy_data(d , half, add_one_dummy_line):
    zero_data = [0] * 63 * half
    
    zero_data = np.array( zero_data )
    zero_data = zero_data.reshape(-1,63)
    
    d = np.concatenate((zero_data , d), axis=0)
    d = np.concatenate((d , zero_data), axis=0)
    
    if add_one_dummy_line:
        zero_data = [0] * 63
        zero_data = np.array( zero_data )
        zero_data = zero_data.reshape(-1,63)
        d = np.concatenate((zero_data , d), axis=0)
    
    #print(d.shape)
    return d
padded_file_name = []

for file in file_path:
    d = pd.read_csv(file)
    d = np.array(d)
    
    half = (max_length - d.shape[0])/2
    
    if int(half) == half:
        d = add_dummy_data(d , int(half) , False)
    else:
        d = add_dummy_data(d , int(half) , True)
        
    d = pd.DataFrame(d)
    
    file_name = file.replace(".csv" , "_padded.csv")
    padded_file_name.append(file_name)
    d.to_csv( file_name , index=False )
padded_file_name
meta_data['padded_file_name'] = padded_file_name
meta_data
meta_data.to_csv("Meta_Data_220105.csv" , index=False)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12518518518518518, 'fraction_numerical': 0.017037037037037038, 'mean_word_length': 3.221875, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '587017', 'license': 'MIT', 'n_tokens_mistral': 564, 'n_tokens_neox': 557, 'n_words': 93, 'path': 'PreProcessing.ipynb', 'repo_name': 'MoonLight314/Hand_Gesture_Detection', 'size': '1350'}