Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

plotting Dataframe #251

Closed
Casyfill opened this issue Apr 21, 2018 · 7 comments
Closed

plotting Dataframe #251

Casyfill opened this issue Apr 21, 2018 · 7 comments

Comments

@Casyfill
Copy link

Casyfill commented Apr 21, 2018

I am trying to figure out how to plot dataframe the way it plots in the Jupyterlab, but so far I wasn't able to do anything but to print it... will appreciate any help

@Casyfill
Copy link
Author

I figured out how to plot df to but wonder if there is any way to make it passive (non-interactive)

@SimonBiggs
Copy link
Owner

There definitely is. Could you use the following tags in your post to copy in the file you're trying to run?

~~~markdown
your file here
~~~

@Casyfill
Copy link
Author

Casyfill commented Apr 22, 2018

# Title

<section-start >
``````python
from business import load_data, analize
ready_to_report = False
fraud = ''
``````
</section-start >
<variable-string placeholder = "path to dataset" > data_path </variable-string >

# 2. Analysis
<section-button value = "Submit" condition = "data_path" >
``````python

data = load_data(data_path)
print(f'...data loaded. Working on {len(data)} records.')
fraud = analize(data)

if len(fraud) == 0:
    print('Hoorah! No fraud at all!')
else:
    print(f'Detected {len(fraud)} frodulent records\n\n')
    ready_to_report = True

``````
<variable-table>fraud</variable-table>
</section-button >
----
<section-button value = "to PDF" condition = "ready_to_report" >
``````python
print('PDF generated!')
``````
</section-button >

@SimonBiggs
Copy link
Owner

SimonBiggs commented Apr 22, 2018

You can use IPython display to display tables using JupyterLab method.

Here is an example using IPython display as well as ScriptedForms table.

<section-start>

```python
from IPython.display import display
```

</section-start>

## Jupyter pandas DataFrame display

<section-button value="Create and show table">

```python
table = pd.DataFrame(data=[[1,2,3]], columns=['a', 'b', 'c'])
display(table)
```

</section-button>

## ScriptedForms DataFrame display set to readonly

<variable-table inputTypes="{'a': 'readonly', 'b': 'readonly', 'c': 'readonly'}">table</variable-table>

@Casyfill
Copy link
Author

Casyfill commented Apr 23, 2018 via email

@SimonBiggs
Copy link
Owner

SimonBiggs commented Apr 23, 2018 via email

@SimonBiggs
Copy link
Owner

How has ScriptedForms been treating you these last few days @Casyfill? Any suggestions to ease in new users?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants