Skip to content
Advertisement

Structure Android LogCat Text File to Structured Pandas DF

I want to convert lines of LogCat Text Files to structured Pandas DF. I cannot seem to properly conceptualize how I am going to do this…Here’s my basic pseudo-code:

JavaScript

The problem is: I do not know how to properly define the delimiter with this structure

08-01 14:28:35.947 1320 1320 D wpa_xxxx: wlan1: skip–ssid

Advertisement

Answer

JavaScript

This will read each line of logFile into a row in a Series, which can then be expanded into a DataFrame via each group in the regular expression. This assumes that 08-01 14:28:35.947 is the first value in each row and that subsequent values are separated by white space.

Advertisement