about pandas dataframe reverse column’s data order

Code import pandas as pd import numpy as np df = pd.DataFrame({"K1":[1,2,3],"K2":[4,5,6]}) df["result"] = (df["K1"].shift(1)*df["K2"]).fillna(1)[::-1] #line A print(df["result"]) print((df["K1"].shift(1)*df["K2"]).fillna(1)[::-1]) #line B print((df["K1"].shift(1)*df["K2"]).fillna(1)) # line C Output 0 1.0 1 5.0 2 12.0 Name: result, dtype: float64 2 12.0 1 5.0 0 1.0 dtype: float64 0 1.0 1 5.0 2 12.0 dtype: float64 Why column result … Read more

How do I get the file name and values I am getting form a file into a dataframe python

I am looking to read more than one file that starts with access-team then after I read the files I access them and get the information after username = and put it into a dataframe having a username and filename associated to
Here is the code I currently have but doesn’t it doesn’t dot it all yet. I am not sure how to read the two files and incorporate them into what I have below. my current results for one file are in one column. I need the dataframe to have the username and the file name.
file name: access-team-rev.txt file two is same way to but it is called access-team-support.txt
files look like this: