-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdataExploration.py
51 lines (40 loc) · 1.07 KB
/
dataExploration.py
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
42
43
44
45
46
47
48
49
50
51
# I want to visualise data using the bioinformatics data I have
import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pd
# Assuming `data` is a dictionary with keys as sequences and values as their counts
metaDataFile = 'data/metadata_ERP107715.tsv'
metaData = pd.read_csv(metaDataFile, sep='\t')
#display first few rows
print(metaData.head())
print('\n')
#structure of dataframe
print("Data shape:")
print(metaData.shape)
print('\n')
print(metaData.info())
print('\n')
#Summary stats
print("Summary statistics:")
print(metaData.describe())
print('\n')
#Columns of the data
print(metaData.columns.tolist())
#for the columns of the metadata in ERP107715, generate in the age column, numbers between 5-12
dataFile = 'data/ERP107715.tsv'
data = pd.read_csv(dataFile, sep='\t')
#display first few rows
print(data.head())
print('\n')
#structure of dataframe
print("Data shape:")
print(data.shape)
print('\n')
print(data.info())
print('\n')
#Summary stats
print("Summary statistics:")
print(data.describe())
print('\n')
#Columns of the data
print(data.columns.tolist())