[ZEPPELIN-1255] Add cast to string in z.show() for Pandas DataFrame#1249
[ZEPPELIN-1255] Add cast to string in z.show() for Pandas DataFrame#1249bustios wants to merge 2 commits into
Conversation
|
looks good! |
|
could you add tests for this? |
|
Looks great to me, @bustios could you add a simple test case that reproduce this case to the python/src/test/java/org/apache/zeppelin/python/PythonInterpreterPandasSqlTest.java ? |
|
Tranks for the revision @felixcheung, @bzz. I have already added the test case. I think it would be nice to show a column with the row number or index if the DataFrame had one. |
|
Looks great to me.
@bustios This makes sense, please feel free to open a separate JIRA issue for such improvement. We just need to make sure that it's clearly distinguished and can not be confused by the user as a part of the dataset. CI failure is due to flaky R integration tests, which are not related Merging if there is no further discussion. |
### What is this PR for? Casting data types in Pandas DataFrame to string in z.show() ### What type of PR is it? Bug Fix ### What is the Jira issue? [ZEPPELIN-1255](https://issues.apache.org/jira/browse/ZEPPELIN-1255) ### How should this be tested? ``` %python import pandas as pd df = pd.read_csv('https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data', header=None) df.columns=[1, 2, 3, 'PetalWidth', 'Name'] z.show(df) %python.sql SELECT * FROM df LIMIT 10 ``` ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Author: paulbustios <pbustios@gmail.com> Closes apache#1249 from bustios/ZEPPELIN-1255 and squashes the following commits: 82c1412 [paulbustios] Add test case for z.show() Pandas DataFrame 4a8c0a9 [paulbustios] [ZEPPELIN-1255] Add cast to string in z.show() for Pandas DataFrame
What is this PR for?
Casting data types in Pandas DataFrame to string in z.show()
What type of PR is it?
Bug Fix
What is the Jira issue?
ZEPPELIN-1255
How should this be tested?
Questions: