'Create table from txt file
I have a .txt file that looks just like a table with multiple rows and even more columns, this is just an example:
FRU LPP BOARD BO QU CT (TX/dBm) VSP (RyL) RX (dBm) UEs/RLs
RR B_20 RB7 A 11 - - 1,31 18 2.9 -/-
RT B_21 RB7 B 11 - - 1,09 3 2.1 20/-
I'm interested in extracting data from a specific column. It feels like i've tried everything with Pandas read_csv function but i have not been able to get results, it seems like an easy task but i'm really stuck here
Columns_from_txt = VA.partition('\n')[0].split()[0:-2] #extracting top row to be my columnames
Row_from_txt = VA.split('\n')[2:-2] #extracting all rows
df = pd.read_csv(Row_from_txt, names=Columns_from_txt)
print(df['BOARD'])
This is just the latest example from all that i've tried, i dont know what else to do than to reach out to you guys. Thanks!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
