i have 10 text files in a directory and each text files has random text data(no tabular form). im trying to create a dataframe out of it and each text file data should should be along rows but not columns.
i tried the code as in below image, but the datas are loading in multiple columns but not in rows. tough i specifies axis parameter in read.csv method still no luck. can anyone help me this.
filelist = glob.glob('D:/Annaconda/Project/aclImdb_v1/aclImdb/test/neg1/*.txt')
df_list = [pd.read_csv(file) for file in filelist]
neg_df = pd.concat(df_list, axis=1, sort=False)
test=pd.DataFrame(neg_df)
test_df['label']=0
test_df.head()
Expected: all file data's should be append in rows.
actual: all file data's are appending in 10 columns.