.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "assignment1/my_example1.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_assignment1_my_example1.py: my_example1.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': [1,2,3], 'col2': [4,5,6]}) print( df ) .. rst-class:: sphx-glr-script-out .. code-block:: none col1 col2 0 1 4 1 2 5 2 3 6 .. 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:: /assignment1/images/sphx_glr_my_example1_001.png :alt: col1 vs col2 :srcset: /assignment1/images/sphx_glr_my_example1_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.081 seconds) .. _sphx_glr_download_assignment1_my_example1.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: my_example1.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: my_example1.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: my_example1.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_