{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n", " \n", " \n", " \n", " \n", "
\n", "
\n", "

nb8. Query using astroquery

\n", "
\n", "
\n", " \n", "
\n", "\n", "In a similar manner to the previous notebooks, it is also possible to run TAP queries using the [astroquery](https://astroquery.readthedocs.io/en/latest/alma/alma.html) Python package. \n", "\n", "The very lastest version of astroquery is needed. This can be installed with:\n", "```bash\n", "pip3 install --upgrade --pre astroquery\n", "```" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "execution": { "iopub.execute_input": "2021-11-16T10:27:23.562145Z", "iopub.status.busy": "2021-11-16T10:27:23.561514Z", "iopub.status.idle": "2021-11-16T10:27:24.526489Z", "shell.execute_reply": "2021-11-16T10:27:24.525964Z" } }, "outputs": [], "source": [ "from astroquery.alma import Alma\n", "import numpy as np\n", "import astropy" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You can obtain keywords, description and units of the ALMA TAP service by calling:" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "execution": { "iopub.execute_input": "2021-11-16T10:27:24.531366Z", "iopub.status.busy": "2021-11-16T10:27:24.530478Z", "iopub.status.idle": "2021-11-16T10:27:24.536025Z", "shell.execute_reply": "2021-11-16T10:27:24.536519Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "Most common ALMA query keywords are listed below. These keywords are part of the ALMA ObsCore model, an IVOA standard for metadata representation (3rd column). They were also present in original ALMA Web form and, for backwards compatibility can be accessed with their old names (2nd column).\n", "More elaborate queries on the ObsCore model are possible with `query_sia` or `query_tap` methods\n", " Description Original ALMA keyword ObsCore keyword \n", "-------------------------------------------------------------------------------------------------------\n", "\n", "Position\n", " Source name (astropy Resolver) source_name_resolver SkyCoord.from_name \n", " Source name (ALMA) source_name_alma target_name \n", " RA Dec (Sexagesimal) ra_dec s_ra, s_dec \n", " Galactic (Degrees) galactic gal_longitude, gal_latitude \n", " Angular resolution (arcsec) spatial_resolution spatial_resolution \n", " Largest angular scale (arcsec) spatial_scale_max spatial_scale_max \n", " Field of view (arcsec) fov s_fov \n", "\n", "Energy\n", " Frequency (GHz) frequency frequency \n", " Bandwidth (GHz) bandwidth bandwidth \n", " Spectral resolution (KHz) spectral_resolution em_resolution \n", " Band band_list band_list \n", "\n", "Time\n", " Observation date start_date t_min \n", " Integration time (s) integration_time t_exptime \n", "\n", "Polarization\n", " Polarisation type (Single, Dual, Full) polarisation_type pol_states \n", "\n", "Observation\n", " Line sensitivity (10 km/s) (mJy/beam) line_sensitivity sensitivity_10kms \n", " Continuum sensitivity (mJy/beam) continuum_sensitivity cont_sensitivity_bandwidth \n", " Water vapour (mm) water_vapour pvw \n", "\n", "Project\n", " Project code project_code proposal_id \n", " Project title project_title obs_title \n", " PI name pi_name obs_creator_name \n", " Proposal authors proposal_authors proposal_authors \n", " Project abstract project_abstract proposal_abstract \n", " Publication count publication_count NA \n", " Science keyword science_keyword science_keyword \n", "\n", "Publication\n", " Bibcode bibcode bib_reference \n", " Title pub_title pub_title \n", " First author first_author first_author \n", " Authors authors authors \n", " Abstract pub_abstract pub_abstract \n", " Year publication_year pub_year \n", "\n", "Options\n", " Public data only public_data data_rights \n", " Science observations only science_observation science_observation \n", "\n", "Examples of queries:\n", "Alma.query('proposal_id':'2011.0.00131.S'}\n", "Alma.query({'band_list': ['5', '7']}\n", "Alma.query({'source_name_alma': 'GRB021004'})\n", "Alma.query(payload=dict(project_code='2017.1.01355.L', source_name_alma='G008.67'))\n" ] } ], "source": [ "Alma.help()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "-----------------------------------------\n", "\n", "## Example 8a: Query one object by a resolved source name and then by coordinates using TAP\n", "\n", "This is equivalent to the queries we show in notebook 1." ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "execution": { "iopub.execute_input": "2021-11-16T10:27:24.541912Z", "iopub.status.busy": "2021-11-16T10:27:24.541312Z", "iopub.status.idle": "2021-11-16T10:27:26.115316Z", "shell.execute_reply": "2021-11-16T10:27:26.116003Z" } }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
access_urlaccess_formatproposal_iddata_rightsgal_longitudegal_latitudeobs_publisher_didobs_collectionfacility_nameinstrument_name...frequencyvelocity_resolutionobs_creator_namepub_titlefirst_authorqa2_passedbib_referencescience_keywordscientific_categorylastModified
0http://almascience.org/aq?member_ous_id=uid://...text/html2011.0.00008.SVPublic309.51236319.416239ADS/JAO.ALMA#2011.0.00008.SVALMAJAOALMA...238.2616131183.847494observatory, ALMAALMA Observations of the Physical and Chemical...Azeez, Jazeel H. Israel, F. P. McCoy, MarkT2014A&A...562A..96I 2017AdAst2017E...6A 2017Ap...Galactic centres/nuclei, Active Galactic Nucle...Active galaxies2021-09-30T16:34:41.133
1http://almascience.org/aq?member_ous_id=uid://...text/html2011.0.00008.SVPublic309.51236319.416239ADS/JAO.ALMA#2011.0.00008.SVALMAJAOALMA...238.2616131183.847494observatory, ALMAALMA Observations of the Physical and Chemical...Azeez, Jazeel H. Israel, F. P. McCoy, MarkT2014A&A...562A..96I 2017AdAst2017E...6A 2017Ap...Galactic centres/nuclei, Active Galactic Nucle...Active galaxies2021-09-30T16:34:41.133
2http://almascience.org/aq?member_ous_id=uid://...text/html2011.0.00008.SVPublic309.51236319.416239ADS/JAO.ALMA#2011.0.00008.SVALMAJAOALMA...238.2616131183.847494observatory, ALMAALMA Observations of the Physical and Chemical...Azeez, Jazeel H. Israel, F. P. McCoy, MarkT2014A&A...562A..96I 2017AdAst2017E...6A 2017Ap...Galactic centres/nuclei, Active Galactic Nucle...Active galaxies2021-09-30T16:34:41.133
3http://almascience.org/aq?member_ous_id=uid://...text/html2011.0.00008.SVPublic309.51236319.416239ADS/JAO.ALMA#2011.0.00008.SVALMAJAOALMA...238.2616131183.847494observatory, ALMAALMA Observations of the Physical and Chemical...Azeez, Jazeel H. Israel, F. P. McCoy, MarkT2014A&A...562A..96I 2017AdAst2017E...6A 2017Ap...Galactic centres/nuclei, Active Galactic Nucle...Active galaxies2021-09-30T16:34:41.133
4http://almascience.org/aq?member_ous_id=uid://...text/html2011.0.00010.SPublic309.51591419.417224ADS/JAO.ALMA#2011.0.00010.SALMAJAOALMA...219.025328663.940713Ott, JuergenALMA Observations of the Physical and Chemical...McCoy, MarkT2017ApJ...851...76MActive Galactic Nuclei (AGN)/Quasars (QSO), Me...Active galaxies2021-09-30T16:34:41.133
\n", "

5 rows × 63 columns

\n", "
" ], "text/plain": [ " access_url access_format \\\n", "0 http://almascience.org/aq?member_ous_id=uid://... text/html \n", "1 http://almascience.org/aq?member_ous_id=uid://... text/html \n", "2 http://almascience.org/aq?member_ous_id=uid://... text/html \n", "3 http://almascience.org/aq?member_ous_id=uid://... text/html \n", "4 http://almascience.org/aq?member_ous_id=uid://... text/html \n", "\n", " proposal_id data_rights gal_longitude gal_latitude \\\n", "0 2011.0.00008.SV Public 309.512363 19.416239 \n", "1 2011.0.00008.SV Public 309.512363 19.416239 \n", "2 2011.0.00008.SV Public 309.512363 19.416239 \n", "3 2011.0.00008.SV Public 309.512363 19.416239 \n", "4 2011.0.00010.S Public 309.515914 19.417224 \n", "\n", " obs_publisher_did obs_collection facility_name instrument_name \\\n", "0 ADS/JAO.ALMA#2011.0.00008.SV ALMA JAO ALMA \n", "1 ADS/JAO.ALMA#2011.0.00008.SV ALMA JAO ALMA \n", "2 ADS/JAO.ALMA#2011.0.00008.SV ALMA JAO ALMA \n", "3 ADS/JAO.ALMA#2011.0.00008.SV ALMA JAO ALMA \n", "4 ADS/JAO.ALMA#2011.0.00010.S ALMA JAO ALMA \n", "\n", " ... frequency velocity_resolution obs_creator_name \\\n", "0 ... 238.261613 1183.847494 observatory, ALMA \n", "1 ... 238.261613 1183.847494 observatory, ALMA \n", "2 ... 238.261613 1183.847494 observatory, ALMA \n", "3 ... 238.261613 1183.847494 observatory, ALMA \n", "4 ... 219.025328 663.940713 Ott, Juergen \n", "\n", " pub_title \\\n", "0 ALMA Observations of the Physical and Chemical... \n", "1 ALMA Observations of the Physical and Chemical... \n", "2 ALMA Observations of the Physical and Chemical... \n", "3 ALMA Observations of the Physical and Chemical... \n", "4 ALMA Observations of the Physical and Chemical... \n", "\n", " first_author qa2_passed \\\n", "0 Azeez, Jazeel H. Israel, F. P. McCoy, Mark T \n", "1 Azeez, Jazeel H. Israel, F. P. McCoy, Mark T \n", "2 Azeez, Jazeel H. Israel, F. P. McCoy, Mark T \n", "3 Azeez, Jazeel H. Israel, F. P. McCoy, Mark T \n", "4 McCoy, Mark T \n", "\n", " bib_reference \\\n", "0 2014A&A...562A..96I 2017AdAst2017E...6A 2017Ap... \n", "1 2014A&A...562A..96I 2017AdAst2017E...6A 2017Ap... \n", "2 2014A&A...562A..96I 2017AdAst2017E...6A 2017Ap... \n", "3 2014A&A...562A..96I 2017AdAst2017E...6A 2017Ap... \n", "4 2017ApJ...851...76M \n", "\n", " science_keyword scientific_category \\\n", "0 Galactic centres/nuclei, Active Galactic Nucle... Active galaxies \n", "1 Galactic centres/nuclei, Active Galactic Nucle... Active galaxies \n", "2 Galactic centres/nuclei, Active Galactic Nucle... Active galaxies \n", "3 Galactic centres/nuclei, Active Galactic Nucle... Active galaxies \n", "4 Active Galactic Nuclei (AGN)/Quasars (QSO), Me... Active galaxies \n", "\n", " lastModified \n", "0 2021-09-30T16:34:41.133 \n", "1 2021-09-30T16:34:41.133 \n", "2 2021-09-30T16:34:41.133 \n", "3 2021-09-30T16:34:41.133 \n", "4 2021-09-30T16:34:41.133 \n", "\n", "[5 rows x 63 columns]" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "coordinates = astropy.coordinates.SkyCoord.from_name(\"Cen A\")\n", "output = Alma.query_tap(f\"SELECT * FROM ivoa.obscore WHERE INTERSECTS(CIRCLE('ICRS',{coordinates.ra.degree},{coordinates.dec.degree},0.16),s_region)=1\").to_table().to_pandas()\n", "output.head(5)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Print all the target names associated with these coordinates:" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "execution": { "iopub.execute_input": "2021-11-16T10:27:26.123386Z", "iopub.status.busy": "2021-11-16T10:27:26.122459Z", "iopub.status.idle": "2021-11-16T10:27:26.126525Z", "shell.execute_reply": "2021-11-16T10:27:26.125922Z" } }, "outputs": [ { "data": { "text/plain": [ "array(['1322-427', '3FGL_J1325.4-4301', 'CenA', 'Cen_A', 'Centaurus A',\n", " 'Centaurus_A', 'Centaurus_a', 'J1325-430', 'J1325-4301',\n", " 'NGC_5128'], dtype=object)" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "np.unique(output['target_name']) " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "-------------------------------------------\n", "\n", "## Example 8b: Query one object by the ALMA source name, using the standard astroquery\n", "\n", "As in notebook 1, querying by source name should use the name resolver, e.g. Example 8a. Only in very special occasions it can be useful to query for the source name that the PI has put into their proposal. Many sources have a large variety of different names." ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "execution": { "iopub.execute_input": "2021-11-16T10:27:26.132897Z", "iopub.status.busy": "2021-11-16T10:27:26.130646Z", "iopub.status.idle": "2021-11-16T10:27:26.311305Z", "shell.execute_reply": "2021-11-16T10:27:26.312106Z" } }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
access_urlaccess_formatproposal_iddata_rightsgal_longitudegal_latitudeobs_publisher_didobs_collectionfacility_nameinstrument_name...frequencyvelocity_resolutionobs_creator_namepub_titlefirst_authorqa2_passedbib_referencescience_keywordscientific_categorylastModified
0http://almascience.org/aq?member_ous_id=uid://...text/html2011.0.00010.SPublic309.51591419.417224ADS/JAO.ALMA#2011.0.00010.SALMAJAOALMA...111.417365322.835911Ott, JuergenALMA Observations of the Physical and Chemical...McCoy, MarkT2017ApJ...851...76MActive Galactic Nuclei (AGN)/Quasars (QSO), Me...Active galaxies2021-09-30T16:34:41.133
1http://almascience.org/aq?member_ous_id=uid://...text/html2011.0.00010.SPublic309.51591419.417224ADS/JAO.ALMA#2011.0.00010.SALMAJAOALMA...111.417365322.835911Ott, JuergenALMA Observations of the Physical and Chemical...McCoy, MarkT2017ApJ...851...76MActive Galactic Nuclei (AGN)/Quasars (QSO), Me...Active galaxies2021-09-30T16:34:41.133
2http://almascience.org/aq?member_ous_id=uid://...text/html2011.0.00010.SPublic309.51591419.417224ADS/JAO.ALMA#2011.0.00010.SALMAJAOALMA...111.417365322.835911Ott, JuergenALMA Observations of the Physical and Chemical...McCoy, MarkT2017ApJ...851...76MActive Galactic Nuclei (AGN)/Quasars (QSO), Me...Active galaxies2021-09-30T16:34:41.133
3http://almascience.org/aq?member_ous_id=uid://...text/html2011.0.00010.SPublic309.51591419.417224ADS/JAO.ALMA#2011.0.00010.SALMAJAOALMA...111.417365322.835911Ott, JuergenALMA Observations of the Physical and Chemical...McCoy, MarkT2017ApJ...851...76MActive Galactic Nuclei (AGN)/Quasars (QSO), Me...Active galaxies2021-09-30T16:34:41.133
4http://almascience.org/aq?member_ous_id=uid://...text/html2011.0.00010.SPublic309.51591419.417224ADS/JAO.ALMA#2011.0.00010.SALMAJAOALMA...92.655678368.331902Ott, JuergenALMA Observations of the Physical and Chemical...McCoy, MarkT2017ApJ...851...76MActive Galactic Nuclei (AGN)/Quasars (QSO), Me...Active galaxies2021-09-30T16:34:41.133
\n", "

5 rows × 63 columns

\n", "
" ], "text/plain": [ " access_url access_format \\\n", "0 http://almascience.org/aq?member_ous_id=uid://... text/html \n", "1 http://almascience.org/aq?member_ous_id=uid://... text/html \n", "2 http://almascience.org/aq?member_ous_id=uid://... text/html \n", "3 http://almascience.org/aq?member_ous_id=uid://... text/html \n", "4 http://almascience.org/aq?member_ous_id=uid://... text/html \n", "\n", " proposal_id data_rights gal_longitude gal_latitude \\\n", "0 2011.0.00010.S Public 309.515914 19.417224 \n", "1 2011.0.00010.S Public 309.515914 19.417224 \n", "2 2011.0.00010.S Public 309.515914 19.417224 \n", "3 2011.0.00010.S Public 309.515914 19.417224 \n", "4 2011.0.00010.S Public 309.515914 19.417224 \n", "\n", " obs_publisher_did obs_collection facility_name instrument_name \\\n", "0 ADS/JAO.ALMA#2011.0.00010.S ALMA JAO ALMA \n", "1 ADS/JAO.ALMA#2011.0.00010.S ALMA JAO ALMA \n", "2 ADS/JAO.ALMA#2011.0.00010.S ALMA JAO ALMA \n", "3 ADS/JAO.ALMA#2011.0.00010.S ALMA JAO ALMA \n", "4 ADS/JAO.ALMA#2011.0.00010.S ALMA JAO ALMA \n", "\n", " ... frequency velocity_resolution obs_creator_name \\\n", "0 ... 111.417365 322.835911 Ott, Juergen \n", "1 ... 111.417365 322.835911 Ott, Juergen \n", "2 ... 111.417365 322.835911 Ott, Juergen \n", "3 ... 111.417365 322.835911 Ott, Juergen \n", "4 ... 92.655678 368.331902 Ott, Juergen \n", "\n", " pub_title first_author \\\n", "0 ALMA Observations of the Physical and Chemical... McCoy, Mark \n", "1 ALMA Observations of the Physical and Chemical... McCoy, Mark \n", "2 ALMA Observations of the Physical and Chemical... McCoy, Mark \n", "3 ALMA Observations of the Physical and Chemical... McCoy, Mark \n", "4 ALMA Observations of the Physical and Chemical... McCoy, Mark \n", "\n", " qa2_passed bib_reference \\\n", "0 T 2017ApJ...851...76M \n", "1 T 2017ApJ...851...76M \n", "2 T 2017ApJ...851...76M \n", "3 T 2017ApJ...851...76M \n", "4 T 2017ApJ...851...76M \n", "\n", " science_keyword scientific_category \\\n", "0 Active Galactic Nuclei (AGN)/Quasars (QSO), Me... Active galaxies \n", "1 Active Galactic Nuclei (AGN)/Quasars (QSO), Me... Active galaxies \n", "2 Active Galactic Nuclei (AGN)/Quasars (QSO), Me... Active galaxies \n", "3 Active Galactic Nuclei (AGN)/Quasars (QSO), Me... Active galaxies \n", "4 Active Galactic Nuclei (AGN)/Quasars (QSO), Me... Active galaxies \n", "\n", " lastModified \n", "0 2021-09-30T16:34:41.133 \n", "1 2021-09-30T16:34:41.133 \n", "2 2021-09-30T16:34:41.133 \n", "3 2021-09-30T16:34:41.133 \n", "4 2021-09-30T16:34:41.133 \n", "\n", "[5 rows x 63 columns]" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "output = Alma.query({'source_name_alma': 'CenA'}).to_pandas()\n", "output.head(5)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "-------------------------------------------\n", "\n", "## Example 8c: Query one object by resolved ALMA source name, using TAP through astroquery\n", "\n", "Similar to notebook 1, TAP can also be used for the queries through Astroquery. In SQL, the % is the special character for \"any string\", equivalent to * in the shell. Similarly, in SQL the _ is the special character for \"any character\", equivalent to ? in the shell." ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "execution": { "iopub.execute_input": "2021-11-16T10:27:26.319936Z", "iopub.status.busy": "2021-11-16T10:27:26.319310Z", "iopub.status.idle": "2021-11-16T10:27:28.110183Z", "shell.execute_reply": "2021-11-16T10:27:28.110664Z" } }, "outputs": [], "source": [ "output = Alma.query_tap(f\"SELECT * FROM ivoa.obscore WHERE target_name like '%Cen%A%'\").to_table().to_pandas()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The variations of the source name which include 'Cen' and 'A' are the following:" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "execution": { "iopub.execute_input": "2021-11-16T10:27:28.116214Z", "iopub.status.busy": "2021-11-16T10:27:28.115578Z", "iopub.status.idle": "2021-11-16T10:27:28.118332Z", "shell.execute_reply": "2021-11-16T10:27:28.119090Z" } }, "outputs": [ { "data": { "text/plain": [ "array(['Cen A - Xray N5', 'CenA', 'CenA - CO knot S1', 'CenA - Xray N1',\n", " 'CenA - Xray N2', 'CenA - Xray N3', 'CenA - Xray N4', 'Cen_A',\n", " 'Centaurus A', 'Centaurus_A'], dtype=object)" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "np.unique(output['target_name']) " ] } ], "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.6.10" } }, "nbformat": 4, "nbformat_minor": 4 }