0

I'm importing the following csv file:

import pandas as pd
from numpy import log, abs, sign, sqrt
import brunel

# Read data
DISKAVGRIO = pd.read_csv("../DISKAVGRIO_nmon.csv")

DISKAVGRIO.head(6)

And the following table:

Hostname      | Date-Time                   | hdisk1342    | hdisk1340     | hdisk1343   | ...   
------------  | -----------------------     | -----------  | ------------- | ----------- | ------ 
host1         | 12-08-2015 00:56:12         | 0.0          | 0.0           | 0.0         | ...   
host1         | 12-08-2015 01:11:13         | 0.0          | 0.0           | 0.0         | ...   
host1         | 12-08-2015 01:26:14         | 0.0          | 0.0           | 0.0         | ...   
host1         | 12-08-2015 01:41:14         | 0.0          | 0.0           | 0.0         | ...   
host1         | 12-08-2015 01:56:14         | 0.0          | 0.4           | 4.2         | ...   
host1         | 12-08-2015 02:11:14         | 0.0          | 0.0           | 0.0         | ...   

How do I select all fields that starts with hdisk?

1 Answers1

0

Brunel does not directly support this, but you can define a python variable that builds the string you need for the Brunel and then use this field with a $ inside the Brunel magic. See this stackoverflow issue for details.

b = "y(hdisk1342)"
%brunel data('DISKAVGRIO') x(Date_Time) $b  line
Community
  • 1
  • 1
Dan
  • 31