{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Plotting a Pandas Dataframe\n\nHypertools supports single-index Pandas Dataframes as input. In this example, we\nplot the mushrooms dataset from the kaggle database. This is a dataset of text\nfeatures describing different attributes of a mushroom. Dataframes that contain\ncolumns with text are converted into binary feature vectors representing the\npresence or absences of the feature (see Pandas.Dataframe.get_dummies for more).\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "# Code source: Andrew Heusser\n# License: MIT\n\n# import\nimport hypertools as hyp\n\n# load example data\ngeo = hyp.load('mushrooms')\n\nprint(geo.get_data().head())\n\n# plot\ngeo.plot()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.4" } }, "nbformat": 4, "nbformat_minor": 0 }