Quantcast
Channel: Active questions tagged config - Stack Overflow
Viewing all articles
Browse latest Browse all 5049

Using Pandas to Extract config file (Looks like K/V but not)

$
0
0

I have a config file in the format below:

Models{
    Model1{
        Description = "xxxx"
        Feature = "yyyy"
        EventType = [
            "Type1", 
            "Type2"]
    }

    Model2{
        Description = "aaaa"
        Feature = "bbbb"
        EventType = [
            "Type3", 
            "Type4"]
    }
}

Is there a way to transform this into a dataframe as below?

|Model  | Description | Feature | EventType    | 
------------------------------------------------
|Model1 | xxxx        | yyyy    | Type1, Type2 |
|Model2 | aaaa        | bbbb    | Type3, Type4 |

Viewing all articles
Browse latest Browse all 5049

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>