Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- code
- ----
- # Create the memory dataframe
- memory_df = pd.DataFrame()
- memory_df.astype('int32').dtypes
- temp_df = pd.DataFrame()
- temp_df.astype('int32').dtypes
- print(f"Reading text files into the Memory DF")
- for filename in filelist:
- print(f"Adding filename: {filename}")
- filename = text_path + filename
- temp_df = pd.read_csv(filename, delim_whitespace=True, header=None)
- temp_df.columns = ['Memory']
- temp_df.astype('int32').dtypes
- memory_df = memory_df.append(temp_df)
- memory_df.columns = ['Memory']
- ---
- output
- ---
- ***Memory Data Frame:
- Memory
- 0 1843260
- 0 7706164
- 0 7904828
- 0 7706164
- 0 7706172
- 0 7648524
- 0 7648524
- 0 7706172
- 0 7706164
- 0 7904828
- 0 7706172
- 0 7648524
- 0 7706172
- 0 16075888
- 0 7904672
- 0 7904680
- 0 7904672
- 0 7904680
- 0 16075880
- 0 7904672
- ***
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement