practice/core.py 1 location
|
@@ 15-35 (lines=21) @@
|
| 12 |
|
from matplotlib import rcParams |
| 13 |
|
|
| 14 |
|
|
| 15 |
|
def read_cycle(data): |
| 16 |
|
"""This function reads a segment of datafile (corresponding a cycle) |
| 17 |
|
and generates a dataframe with columns 'Potential' and 'Current' |
| 18 |
|
|
| 19 |
|
Parameters |
| 20 |
|
__________ |
| 21 |
|
data: segment of data file |
| 22 |
|
|
| 23 |
|
Returns |
| 24 |
|
_______ |
| 25 |
|
A dataframe with potential and current columns |
| 26 |
|
""" |
| 27 |
|
|
| 28 |
|
current = [] |
| 29 |
|
potential = [] |
| 30 |
|
for i in data[3:]: |
| 31 |
|
current.append(float(i.split("\t")[4])) |
| 32 |
|
potential.append(float(i.split("\t")[3])) |
| 33 |
|
zippedList = list(zip(potential, current)) |
| 34 |
|
df = pd.DataFrame(zippedList, columns = ['Potential' , 'Current']) |
| 35 |
|
return df |
| 36 |
|
|
| 37 |
|
|
| 38 |
|
def read_file_dash(lines): |
practice/dash_resumable_upload.py 1 location
|
@@ 15-35 (lines=21) @@
|
| 12 |
|
from matplotlib import rcParams |
| 13 |
|
|
| 14 |
|
|
| 15 |
|
def read_cycle(data): |
| 16 |
|
"""This function reads a segment of datafile (corresponding a cycle) |
| 17 |
|
and generates a dataframe with columns 'Potential' and 'Current' |
| 18 |
|
|
| 19 |
|
Parameters |
| 20 |
|
__________ |
| 21 |
|
data: segment of data file |
| 22 |
|
|
| 23 |
|
Returns |
| 24 |
|
_______ |
| 25 |
|
A dataframe with potential and current columns |
| 26 |
|
""" |
| 27 |
|
|
| 28 |
|
current = [] |
| 29 |
|
potential = [] |
| 30 |
|
for i in data[3:]: |
| 31 |
|
current.append(float(i.split("\t")[4])) |
| 32 |
|
potential.append(float(i.split("\t")[3])) |
| 33 |
|
zippedList = list(zip(potential, current)) |
| 34 |
|
df = pd.DataFrame(zippedList, columns = ['Potential' , 'Current']) |
| 35 |
|
return df |
| 36 |
|
|
| 37 |
|
|
| 38 |
|
def read_file_dash(lines): |
voltcycle/core.py 1 location
|
@@ 15-35 (lines=21) @@
|
| 12 |
|
from matplotlib import rcParams |
| 13 |
|
|
| 14 |
|
|
| 15 |
|
def read_cycle(data): |
| 16 |
|
"""This function reads a segment of datafile (corresponding a cycle) |
| 17 |
|
and generates a dataframe with columns 'Potential' and 'Current' |
| 18 |
|
|
| 19 |
|
Parameters |
| 20 |
|
__________ |
| 21 |
|
data: segment of data file |
| 22 |
|
|
| 23 |
|
Returns |
| 24 |
|
_______ |
| 25 |
|
A dataframe with potential and current columns |
| 26 |
|
""" |
| 27 |
|
|
| 28 |
|
current = [] |
| 29 |
|
potential = [] |
| 30 |
|
for i in data[3:]: |
| 31 |
|
current.append(float(i.split("\t")[4])) |
| 32 |
|
potential.append(float(i.split("\t")[3])) |
| 33 |
|
zippedList = list(zip(potential, current)) |
| 34 |
|
df = pd.DataFrame(zippedList, columns = ['Potential' , 'Current']) |
| 35 |
|
return df |
| 36 |
|
|
| 37 |
|
|
| 38 |
|
def read_file_dash(lines): |
voltcycle/submodule/file_read.py 1 location
|
@@ 7-27 (lines=21) @@
|
| 4 |
|
import copy |
| 5 |
|
from matplotlib import rcParams |
| 6 |
|
|
| 7 |
|
def read_cycle(data): |
| 8 |
|
"""This function reads a segment of datafile (corresponding a cycle) |
| 9 |
|
and generates a dataframe with columns 'Potential' and 'Current' |
| 10 |
|
|
| 11 |
|
Parameters |
| 12 |
|
__________ |
| 13 |
|
data: segment of data file |
| 14 |
|
|
| 15 |
|
Returns |
| 16 |
|
_______ |
| 17 |
|
A dataframe with potential and current columns |
| 18 |
|
""" |
| 19 |
|
|
| 20 |
|
current = [] |
| 21 |
|
potential = [] |
| 22 |
|
for i in data[3:]: |
| 23 |
|
current.append(float(i.split("\t")[4])) |
| 24 |
|
potential.append(float(i.split("\t")[3])) |
| 25 |
|
zippedList = list(zip(potential, current)) |
| 26 |
|
df = pd.DataFrame(zippedList, columns = ['Potential' , 'Current']) |
| 27 |
|
return df |
| 28 |
|
|
| 29 |
|
|
| 30 |
|
def read_file(file): |