Skip to content

A dynamo package that uses the popular Python data science library Pandas

License

Notifications You must be signed in to change notification settings

SHKnudsen/Pandamo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pandamo Logo
Pandamo

Datascience for Dynamo

Pandamo - pandas for Dynamo

Pandamo is a Dynamo package that utilizes the popular Python data science library Pandas. With Pandamo you can create and manipulate dataframes in Dynamo, just as you would do it when using pandas in Python.

How it works

Out-of-the-box Dynamo only allows you to use IronPython, which dosen't include all the popular packages that makes Python so powerful. Pandamo is here to change that!

The Tech

Pandamo has a few different pieces that needs to communicate with each other. On a high level Pandamo connects Dynamo with Python, to do this it uses a Flask server, a View Extension and Zero-Touch nodes.

The Pandamo View Extension is used to start the Flask server. The Pandamo server is a local server that only lives on your machine.

The Zero-Touch nodes are used to ask the Flask server to execute a specefic Python function with the inputs provided to the node.

The Flask server is the middle piece that makes Dynamo able to communicate with Python.

How to install Pandamo

For now Pandmo lives right here in this repository on GitHub. In the future i will upload it to the Dynamo Package Manager. But for now you can find the newest release in the Releases section on this repository.

Prerequisite

In order to make Pandamo work on your machine you need to install Miniconda for Python 3.7. Miniconda is needed to create the Python environment that Pandamo uses.

Miniconda is a lighter install of Anaconda, that wont install as many things. Pandamo is currently only tested with Miniconda so as of now it wont work if you use Anaconda.

If you already have a version of Python 3.7 installed i would recomend uninstalling that and use the Miniconda installer so you only have one version of Python 3.7 on your machine.

Make sure you install Miniconda to the default location C:\Users\%USERPROFILE%\Miniconda3

Installing the package

To install the Pandamo package simply follow the steps below:

  • download the Pandamo zip file from Releases section on this repository.
  • Extract the DynamoPandas folder to your Dynamo package folder (C:\Users\\%USERPROFILE%\AppData\Roaming\Dynamo\Dynamo Core\2.x\packages)

After this you should see a Pandamo button in your Dynamo ribbon. This is the Pandamo view extension.

How to use Pandamo

The documentaion of how to use the package is still limited, this will be updated as soon as i have the time.

At the moment there are almost 50 nodes in the dyanmo package, none of them are documented at this point (i know.....).

Right now refer to the sample file NaiveBayesPrediction.dyn to see how some of the nodes work.

Starting the Pandamo server

Before running any Pandamo nodes you need to start the Pandamo server, to do this open the Pandamo view extension and press the Start Server button and wait until you see the Pandamo server is running locally on....

After this the Pandamo nodes are ready to use.

Note that the first time you start the server it will take some time, as the Pandamo environment has to be created.

Stopping the server

Pandamo automatically closes the server when you shut down Dynamo, however if you wnat to shut down the server without closing dynamo you can use the Kill Server button in the view extension window.

Creating a DataFrame

There are 3 different ways to create a dataframe:

By dictionary

By columns and values

From Excel

More information

Stay tuned for more information about the nodes!

Appendix

To learn more about Pandas and the different functions available in Pandamo take a look at the pandas documentation

You can also find various cheat sheets for pandas which show some of the functionality. A good example is this

About

A dynamo package that uses the popular Python data science library Pandas

Resources

License

Stars

Watchers

Forks

Packages

No packages published