-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprintDB.py
More file actions
41 lines (30 loc) · 1.08 KB
/
printDB.py
File metadata and controls
41 lines (30 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import os, sys
import numpy as np
from matplotlib import pyplot as plt
import pandas as pd;
from DBreader import DBreader;
from utils import getPandasPickle;
def main(database):
df = getPandasPickle(database);
pd.set_option('display.max_columns', 50)
pd.set_option('display.max_rows', 50)
print('---- Pandas head in {} -----------'.format(database));
print(df.head());
print('----------------------------------');
print('---- Pandas all in {} -----------'.format(database));
print(df);
print('----------------------------------');
print(df.query('pixel_name=="13.13_232"'));
pd.set_option('display.max_rows', 5)
pd.set_option('display.max_columns', 5)
#database2 = 'data/pb2a-20210205/pb2a_mapping.db';
database2 = 'data/pb2a-20211004/pb2a_mapping.db';
db = DBreader(dbfilename=database2, tablename='pb2a_focalplane', idcolumn='readout_name');
return 0;
if __name__=='__main__' :
database = 'output_ver2/db/all_pandas.pkl'
if len(sys.argv)>1:
database = sys.argv[1];
pass;
main(database);
pass;