Skip to content

Commit

Permalink
update python online doc
Browse files Browse the repository at this point in the history
  • Loading branch information
JasmineOLab committed Jan 3, 2024
1 parent 32f8b97 commit cccd108
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/originpro/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def _exit_handler():
po.Detach()
atexit.register(_exit_handler)

if oext or po.LT_get_var('@V') < 10.10:
if oext or po.LT_get_var('@V') < 10.15:
warnings.simplefilter(action='ignore', category=FutureWarning)

try:
Expand Down
8 changes: 7 additions & 1 deletion src/originpro/worksheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,8 @@ def to_df(self, c1=0, numcols = -1, cindex = -1, head=''):
else:
totalcols = min(self.obj.Cols - c1, numcols)

_, r2 = self.obj.GetBounds(c1, c1 + totalcols - 1)

dd = {}
for col in range(c1, c1 + totalcols):
colobj = self.obj[col]
Expand Down Expand Up @@ -422,6 +424,9 @@ def to_df(self, c1=0, numcols = -1, cindex = -1, head=''):
dfseries = pd.Series(dfseries)

else:
cnt = r2 + 1 - len(coldata)
if cnt > 0:
coldata += [float('nan')] * cnt
dfseries = pd.Series(coldata, list(range(len(coldata))), dtype=None if coldata else 'object')
#loc = col - c1
## ML 06/25/2020 ORG-21995-P1 APPEND_EMPTY_ROWS_BEFORE_LONGER_SERIES_TO_ADD
Expand Down Expand Up @@ -788,7 +793,8 @@ def from_list2(self, data, row=0, col=0):
See Also:
to_list2
"""
def is_seq(d): return isinstance(d, abc.Sequence)
def is_seq(d):
return isinstance(d, abc.Sequence)
if oext and is_seq(data):
if not is_seq(data[0]):
data = [[d] for d in data]
Expand Down

0 comments on commit cccd108

Please sign in to comment.