.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "assignment2/my_example2.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_assignment2_my_example2.py: my_example2.py ========================== Here is a plot example .. GENERATED FROM PYTHON SOURCE LINES 10-12 ## Lets create some data pandas dataframes have a html representation, and this is captured: .. GENERATED FROM PYTHON SOURCE LINES 12-18 .. code-block:: Python import pandas as pd df = pd.DataFrame({'col1': [10,20,30], 'col2': [40,50,60]}) print( df ) .. rst-class:: sphx-glr-script-out .. code-block:: none col1 col2 0 10 40 1 20 50 2 30 60 .. GENERATED FROM PYTHON SOURCE LINES 19-20 ## Lets plot the data .. GENERATED FROM PYTHON SOURCE LINES 20-23 .. code-block:: Python ax = df.plot(x='col1', y='col2', kind='line', title='col1 vs col2') .. image-sg:: /assignment2/images/sphx_glr_my_example2_001.png :alt: col1 vs col2 :srcset: /assignment2/images/sphx_glr_my_example2_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.499 seconds) .. _sphx_glr_download_assignment2_my_example2.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: my_example2.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: my_example2.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: my_example2.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_