8000 Merge pull request #305 from plotly/to-string-bug · kayarre/python-api@a3381a5 · GitHub
[go: up one dir, main page]

Skip to content

Commit a3381a5

Browse files
committed
Merge pull request plotly#305 from plotly/to-string-bug
Dataframes have a `to_string` method!
2 parents 3311acb + 1e807d1 commit a3381a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plotly/graph_objs/graph_objs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,13 +700,13 @@ def to_string(self, level=0, indent=4, eol='\n',
700700
eol=eol,
701701
indent=' ' * indent * (level+1),
702702
key=key)
703-
try:
703+
if isinstance(self[key], PlotlyBase):
704704
string += self[key].to_string(level=level+1,
705705
indent=indent,
706706
eol=eol,
707707
pretty=pretty,
708708
max_chars=max_chars)
709-
except AttributeError:
709+
else:
710710
if pretty: # curtail representation if too many chars
711711
max_len = (max_chars -
712712
indent*(level + 1) -

0 commit comments

Comments
 (0)
0