I have a file with the following format in filename.txt file.
h:\abc\abc_Foldhr_1\hhhhhhhhhh8db
h:\abc\abc_Foldhr_1\hhhhhhhhhh8dc
h:\abc\abc_Foldhr_1\hhhhhhhhhh8dx
h:\abc\abc_Foldhr_1\hhhhhhhhhh8du
h:\abc\abc_Foldhr_1\hhhhhhhhhh8d4
h:\abc\abc_Foldhr_1\hhhhhhhhhh8d5
h:\abc\abc_Foldhr_1\hhhhhhhhhh8d6
h:\abc\abc_Foldhr_1\hhhhhhhhhh8d7
h:\abc\abc_Foldhr_1\hhhhhhhhhh8d8
I was able to read it well but unable to store in pandas data frame or the list or dictionary.
import pandas as pd
#data = pd.read_excel ('/home/home/Documents/pythontestfiles/HON-Lib.xlsx')
data = pd.read_table('/home/home/Documents/pythontestfiles/filename.txt', delim_whitespace=True, names=('A'))
df = pd.DataFrame(data, columns= ['A'])
print(df)
and would like to list out the filename only as
hhhhhhhhhh8db
.
.
.
hhhhhhhhhh8d6
hhhhhhhhhh8d7
hhhhhhhhhh8d8
the purpose of storing in any data frame or dictionary is to compare against the excel file result.
split()