Skip to content

Instantly share code, notes, and snippets.

@kr-stn
Created June 2, 2018 11:28
Show Gist options
  • Save kr-stn/f7944853ed12523ba46fa353db262e4f to your computer and use it in GitHub Desktop.
Save kr-stn/f7944853ed12523ba46fa353db262e4f to your computer and use it in GitHub Desktop.
Sentinelsat Issue #200 - order_by bug
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Explore the cause of the `sentinelsat` bug related to `order_by` https://github.com/sentinelsat/sentinelsat/issues/200"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"from sentinelsat import SentinelAPI, read_geojson, geojson_to_wkt\n",
"import os\n",
"import pandas as pd\n",
"\n",
"api = SentinelAPI(os.environ['DHUS_USER'], os.environ['DHUS_PASSWORD'])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Query all available GRD scenes - returns 183 products.\n",
"\n",
"This is equivalent to the URL: `https://scihub.copernicus.eu/dhus/search?q=producttype:GRD%20AND%20footprint:%22Intersects(POLYGON((117.5000%2041.0000,117.5000%2031.0000,127.5000%2031.0000,127.5000%2038.5000,133.0000%2038.5000,133.0000%2043.3000,127.2000%2043.3000,127.2000%2041.0000,117.5000%2041.0000)))%22%20AND%20ingestiondate:%20[2017-08-01T00:00:00Z%20TO%202017-09-01T00:00:00Z]`"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Querying products: 100%|███████████████████████████████████████████████████| 183/183 [00:01<00:00, 74.07 products/s]\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"183\n"
]
}
],
"source": [
"products = api.query(date=('2017-08-01T00:00:00Z', '2017-09-01T00:00:00Z'),\n",
" area='POLYGON((117.5000 41.0000,117.5000 31.0000,127.5000 31.0000,127.5000 38.5000,133.0000 38.5000,133.0000 43.3000,127.2000 43.3000,127.2000 41.0000,117.5000 41.0000))',\n",
" producttype=\"GRD\")\n",
"print(len(products))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Query, but also `order_by`. The attribute you order on influences the amount of products returned. The available server side order keywords are listed at: https://scihub.copernicus.eu/twiki/do/view/SciHubUserGuide/3FullTextSearch\n",
"\n",
"`footprint` and `collection` are excluded since they cause exceptions when used as `order_by` parameter.\n",
"\n",
"URL to list the first 100 products and ordering by `ingestiondate` in ascending order `https://scihub.copernicus.eu/dhus/search?q=producttype:GRD%20AND%20footprint:\"Intersects(POLYGON((117.5000%2041.0000,117.5000%2031.0000,127.5000%2031.0000,127.5000%2038.5000,133.0000%2038.5000,133.0000%2043.3000,127.2000%2043.3000,127.2000%2041.0000,117.5000%2041.0000)))\"%20AND%20ingestiondate:%20[2017-08-01T00:00:00Z%20TO%202017-09-01T00:00:00Z]&rows=100&start=0&orderby=ingestiondate%20asc`"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Querying products: 100%|██████████████████████████████████████████████████| 183/183 [00:00<00:00, 628.54 products/s]\n",
"Querying products: 100%|██████████████████████████████████████████████████| 183/183 [00:00<00:00, 237.50 products/s]\n",
"Querying products: 100%|██████████████████████████████████████████████████| 183/183 [00:00<00:00, 229.82 products/s]\n",
"Querying products: 100%|██████████████████████████████████████████████████| 183/183 [00:00<00:00, 621.24 products/s]\n",
"Querying products: 100%|██████████████████████████████████████████████████| 183/183 [00:00<00:00, 640.02 products/s]\n",
"Querying products: 100%|██████████████████████████████████████████████████| 183/183 [00:00<00:00, 700.97 products/s]\n",
"Querying products: 100%|██████████████████████████████████████████████████| 183/183 [00:00<00:00, 253.93 products/s]\n",
"Querying products: 100%|██████████████████████████████████████████████████| 183/183 [00:00<00:00, 688.38 products/s]\n",
"Querying products: 100%|██████████████████████████████████████████████████| 183/183 [00:00<00:00, 227.25 products/s]\n",
"Querying products: 100%|███████████████████████████████████████████████████| 183/183 [00:01<00:00, 42.64 products/s]\n",
"Querying products: 100%|██████████████████████████████████████████████████| 183/183 [00:00<00:00, 511.37 products/s]\n",
"Querying products: 100%|███████████████████████████████████████████████████| 183/183 [00:01<00:00, 68.95 products/s]\n",
"Querying products: 100%|██████████████████████████████████████████████████| 183/183 [00:00<00:00, 696.67 products/s]\n",
"Querying products: 100%|███████████████████████████████████████████████████| 183/183 [00:01<00:00, 68.89 products/s]\n",
"Querying products: 100%|██████████████████████████████████████████████████| 183/183 [00:00<00:00, 684.53 products/s]\n"
]
}
],
"source": [
"order_kw = [\"platformname\", \"beginposition\", \"endposition\", \"ingestiondate\", \"filename\", \"orbitnumber\", \"lastorbitnumber\", \"relativeorbitnumber\", \"lastrelativeorbitnumber\", \"orbitdirection\", \"polarisationmode\", \"producttype\", \"sensoroperationalmode\", \"swathidentifier\", \"cloudcoverpercentage\"]\n",
"\n",
"ordered_products = {}\n",
"\n",
"for kw in order_kw:\n",
" try:\n",
" products_ordered = api.query(date=('2017-08-01T00:00:00Z', '2017-09-01T00:00:00Z'),\n",
" area='POLYGON((117.5000 41.0000,117.5000 31.0000,127.5000 31.0000,127.5000 38.5000,133.0000 38.5000,133.0000 43.3000,127.2000 43.3000,127.2000 41.0000,117.5000 41.0000))',\n",
" producttype=\"GRD\",\n",
" order_by=kw)\n",
" ordered_products[kw] = products_ordered\n",
" except:\n",
" ordered_products[kw] = \"Error\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The amount of products returned is dependent on the order keyword. However - it always lists 183 found products.\n",
"\n",
"- it seems like date time objects return 100 products, i.e. only the first page - this relates to `beginposition`, `ingestiondate` and `endposition`\n",
"- `orbitnumbers` return 134 and `relativeorbitnumbers` 136 products\n",
"- string objects return 115 products, except `filename` which returns 132\n",
"- `cloudcoverpercentage` also returns 115 products even though it is not present/empty in Sentinel-1 metadata"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"polarisationmode : 115\n",
"producttype : 115\n",
"filename : 132\n",
"lastorbitnumber : 134\n",
"sensoroperationalmode : 115\n",
"relativeorbitnumber : 136\n",
"swathidentifier : 115\n",
"beginposition : 100\n",
"endposition : 100\n",
"cloudcoverpercentage : 115\n",
"ingestiondate : 100\n",
"orbitnumber : 134\n",
"platformname : 115\n",
"lastrelativeorbitnumber : 136\n",
"orbitdirection : 132\n"
]
}
],
"source": [
"for k in ordered_products.keys():\n",
" print(k,\":\",len(ordered_products[k]))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Explore the differences further by converting the product lists into Pandas DataFrames."
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"df_prod = api.to_dataframe(products)\n",
"df_ordered = api.to_dataframe(ordered_products[\"ingestiondate\"])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Create a DF with all the products present in the full list (183) that are missing in the ordered list."
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"df_diff = df_prod[~df_prod.isin(df_ordered)].dropna()"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Index(['link_icon', 'link_alternative', 'format', 'identifier', 'filename',\n",
" 'slicenumber', 'swathidentifier', 'endposition', 'gmlfootprint',\n",
" 'instrumentname', 'lastorbitnumber', 'link', 'missiondatatakeid',\n",
" 'producttype', 'lastrelativeorbitnumber', 'platformname', 'title',\n",
" 'size', 'footprint', 'acquisitiontype', 'summary', 'polarisationmode',\n",
" 'status', 'sensoroperationalmode', 'relativeorbitnumber',\n",
" 'beginposition', 'instrumentshortname', 'platformidentifier',\n",
" 'ingestiondate', 'orbitnumber', 'uuid', 'productclass',\n",
" 'orbitdirection'],\n",
" dtype='object')"
]
},
"execution_count": 29,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_diff.columns"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/plain": [
"6a1511ab-b30c-45a7-a6b2-2137fbf268cb 2017-08-01 17:25:22.896\n",
"6eba9a78-c43f-4e7b-b2b2-01287dbcc53e 2017-08-01 17:25:23.562\n",
"89d3a13f-3b6d-4b75-b9ab-feab4179843e 2017-08-02 04:04:24.442\n",
"8ec69576-cca3-4470-8b64-159fd1951773 2017-08-02 04:06:30.040\n",
"4bf1aa72-68e6-4cb7-912d-5f210e29c88e 2017-08-02 04:06:32.393\n",
"fbd22541-51a0-4262-8c06-0d306e503681 2017-08-02 04:06:32.576\n",
"5ac01203-d82a-4b9a-9d9c-f6704b17648c 2017-08-02 04:06:32.811\n",
"a927f3fa-4cf8-4c65-a7c7-fa718cd5b52d 2017-08-02 04:06:33.235\n",
"1f012a71-e7a5-473f-a6e0-8eef9de5c125 2017-08-02 16:10:20.803\n",
"8dfa28ce-6e6d-42f3-9e5e-36b00d4bc13a 2017-08-02 16:47:36.148\n",
"917ccd42-a269-426e-9209-bf2275b6fe51 2017-08-02 16:49:54.093\n",
"257d2ea8-f34a-4fae-b168-a2210cd7264f 2017-08-02 16:50:36.804\n",
"b18e2d60-5268-43f2-8b4d-6d0cdb07b228 2017-08-02 16:52:41.336\n",
"cdb8638c-efe3-426c-b174-5ecfefb5afdc 2017-08-02 16:53:10.394\n",
"d45f5c1f-91cd-4082-b950-ed887ce622a2 2017-08-02 16:54:52.733\n",
"1230d0c1-fb57-481c-9457-0d9b94514b8e 2017-08-02 16:59:11.645\n",
"2d414d1d-0f78-4b6e-8121-1f306d6601d7 2017-08-04 02:08:41.698\n",
"a6d5e12e-eea3-499d-8e6a-58d33b8802b7 2017-08-04 02:08:49.099\n",
"e112dfc0-4268-4834-a4d4-47ee20184ba4 2017-08-04 17:31:03.410\n",
"cddfda64-3381-4aae-83b7-1d35d8cc9b3f 2017-08-04 17:45:35.168\n",
"a7788bdd-654f-4114-a4a2-d71c052c888e 2017-08-06 03:36:33.939\n",
"973a721d-dde2-4478-b35f-442e6b5d4e5d 2017-08-06 03:36:46.830\n",
"e6589fb7-d73c-42ac-ada4-7deba9977283 2017-08-06 03:50:39.726\n",
"3f7573e5-5067-4843-a764-6a8f4fc18e99 2017-08-06 03:50:40.861\n",
"2869d68e-06bc-499a-be38-b1e194766a29 2017-08-06 03:50:42.452\n",
"f3779516-17c5-4627-a8b9-6f24c1f9e405 2017-08-06 03:52:31.972\n",
"401d1c17-3c11-4d2e-be2e-b3761342e462 2017-08-06 03:52:32.967\n",
"b38627b8-f23f-43f9-ade9-190a9e7c966b 2017-08-06 03:52:33.085\n",
"27720e5c-fee8-4225-b152-9ab1122db349 2017-08-07 00:08:04.609\n",
"b04403c3-54c1-4e7c-9c5e-f0ffa66be170 2017-08-07 05:10:44.126\n",
" ... \n",
"e84ec47c-fcad-4298-8ec0-bd93912236fc 2017-08-26 13:26:21.822\n",
"212e194c-34c8-429d-9449-61b557da5bd2 2017-08-26 13:26:23.588\n",
"f94da848-b1fd-4865-9511-48e426c29724 2017-08-26 13:26:23.813\n",
"6a5dc3aa-97a5-4b4c-b271-e20e95c9af6d 2017-08-26 13:26:24.500\n",
"24f7ae96-fdbf-4996-b4d3-a8226b9b7aed 2017-08-28 02:08:09.715\n",
"cd5b750d-b681-449a-99af-e1993ebaba5b 2017-08-28 02:08:14.150\n",
"cb6861a2-a082-46f2-8f3c-cb32b1b01b00 2017-08-28 13:34:28.793\n",
"d442164e-e679-4c62-ad76-b8f722713987 2017-08-28 13:34:35.831\n",
"fee7729a-636b-43fa-82ea-1478590e0c84 2017-08-30 03:40:21.288\n",
"fd4e6fb1-beb0-4834-9332-416e28ffe02c 2017-08-30 03:40:22.010\n",
"37973d60-8dc8-4470-b8e9-476784ecd2a6 2017-08-30 03:40:22.319\n",
"e1c72e00-96b3-4eba-b9e7-c5e27783ade3 2017-08-30 03:40:23.248\n",
"1af0ec25-7d89-4a13-8334-c17ba280cce2 2017-08-30 03:42:16.084\n",
"9a0f7453-f8af-4265-951c-89f15f8808f1 2017-08-30 03:42:16.424\n",
"980967d2-9505-4cfe-91a2-af83884d7c41 2017-08-30 03:42:16.591\n",
"f8203295-c440-429f-8ac2-c6c6642ae3e2 2017-08-30 04:02:08.813\n",
"72c855d3-7623-476b-a5bc-5810efe1182b 2017-08-30 12:42:44.535\n",
"97716c9e-5e55-4f8f-89db-01e98dd64929 2017-08-31 06:32:21.203\n",
"cfad23f5-b00b-4b4d-9514-7ec0d3b5508b 2017-08-31 06:34:26.786\n",
"974f2faa-ade2-4579-bd58-965082bce640 2017-08-31 06:34:30.111\n",
"ed11cef7-a920-4fc8-adad-1d429a4e8954 2017-08-31 06:34:30.835\n",
"69c297b4-cc8c-4285-8106-8b38a615ba14 2017-08-31 17:58:46.189\n",
"10839c2d-b865-489e-b25e-a77670bf530b 2017-08-31 17:58:48.261\n",
"e67e8877-6f53-4aea-b783-ee490c78f0ea 2017-08-31 17:59:34.038\n",
"3062b18e-13f5-4f9f-b4ec-ac937410e630 2017-08-31 17:59:45.167\n",
"4d60d407-0fd6-448f-aea5-0438690097aa 2017-08-31 18:02:30.969\n",
"37979890-b46a-4204-a628-c80556c97164 2017-08-31 18:05:30.728\n",
"cefe2060-5bee-4ea9-9da4-b6ac89eddc46 2017-08-31 18:07:07.679\n",
"80f7c36f-88c0-4c02-a98f-1fb7367733f7 2017-08-31 18:07:17.640\n",
"a12e809e-661c-4778-a93e-60db52588877 2017-09-01 01:32:10.000\n",
"Name: ingestiondate, Length: 183, dtype: datetime64[ns]"
]
},
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_prod.sort_values(by=\"ingestiondate\", ascending=True)[\"ingestiondate\"]"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/plain": [
"6a1511ab-b30c-45a7-a6b2-2137fbf268cb 2017-08-01 17:25:22.896\n",
"6eba9a78-c43f-4e7b-b2b2-01287dbcc53e 2017-08-01 17:25:23.562\n",
"89d3a13f-3b6d-4b75-b9ab-feab4179843e 2017-08-02 04:04:24.442\n",
"8ec69576-cca3-4470-8b64-159fd1951773 2017-08-02 04:06:30.040\n",
"4bf1aa72-68e6-4cb7-912d-5f210e29c88e 2017-08-02 04:06:32.393\n",
"fbd22541-51a0-4262-8c06-0d306e503681 2017-08-02 04:06:32.576\n",
"5ac01203-d82a-4b9a-9d9c-f6704b17648c 2017-08-02 04:06:32.811\n",
"a927f3fa-4cf8-4c65-a7c7-fa718cd5b52d 2017-08-02 04:06:33.235\n",
"1f012a71-e7a5-473f-a6e0-8eef9de5c125 2017-08-02 16:10:20.803\n",
"8dfa28ce-6e6d-42f3-9e5e-36b00d4bc13a 2017-08-02 16:47:36.148\n",
"917ccd42-a269-426e-9209-bf2275b6fe51 2017-08-02 16:49:54.093\n",
"257d2ea8-f34a-4fae-b168-a2210cd7264f 2017-08-02 16:50:36.804\n",
"b18e2d60-5268-43f2-8b4d-6d0cdb07b228 2017-08-02 16:52:41.336\n",
"cdb8638c-efe3-426c-b174-5ecfefb5afdc 2017-08-02 16:53:10.394\n",
"d45f5c1f-91cd-4082-b950-ed887ce622a2 2017-08-02 16:54:52.733\n",
"1230d0c1-fb57-481c-9457-0d9b94514b8e 2017-08-02 16:59:11.645\n",
"2d414d1d-0f78-4b6e-8121-1f306d6601d7 2017-08-04 02:08:41.698\n",
"a6d5e12e-eea3-499d-8e6a-58d33b8802b7 2017-08-04 02:08:49.099\n",
"e112dfc0-4268-4834-a4d4-47ee20184ba4 2017-08-04 17:31:03.410\n",
"cddfda64-3381-4aae-83b7-1d35d8cc9b3f 2017-08-04 17:45:35.168\n",
"a7788bdd-654f-4114-a4a2-d71c052c888e 2017-08-06 03:36:33.939\n",
"973a721d-dde2-4478-b35f-442e6b5d4e5d 2017-08-06 03:36:46.830\n",
"e6589fb7-d73c-42ac-ada4-7deba9977283 2017-08-06 03:50:39.726\n",
"3f7573e5-5067-4843-a764-6a8f4fc18e99 2017-08-06 03:50:40.861\n",
"2869d68e-06bc-499a-be38-b1e194766a29 2017-08-06 03:50:42.452\n",
"f3779516-17c5-4627-a8b9-6f24c1f9e405 2017-08-06 03:52:31.972\n",
"401d1c17-3c11-4d2e-be2e-b3761342e462 2017-08-06 03:52:32.967\n",
"b38627b8-f23f-43f9-ade9-190a9e7c966b 2017-08-06 03:52:33.085\n",
"27720e5c-fee8-4225-b152-9ab1122db349 2017-08-07 00:08:04.609\n",
"b04403c3-54c1-4e7c-9c5e-f0ffa66be170 2017-08-07 05:10:44.126\n",
" ... \n",
"0a454a2c-bd09-453a-b63c-2d612d939fb0 2017-08-13 12:34:47.529\n",
"acdd3977-899f-4399-ab2f-bfa1d0ebf6e8 2017-08-13 12:34:47.959\n",
"0120848c-c365-4421-96a2-8d4cf57f8bd1 2017-08-14 03:54:28.736\n",
"bf17a3f6-767a-49b8-8f9b-45738448abcd 2017-08-14 04:18:34.992\n",
"5ac06abd-7a8d-42dd-bc0b-849bb2d70258 2017-08-14 04:18:36.432\n",
"e9092931-05c7-4169-822c-0b327f85c535 2017-08-14 04:18:37.582\n",
"f4616334-7be4-4db1-95e4-bdcc47655697 2017-08-14 04:18:38.804\n",
"3badedc6-f21e-4cde-97fa-7ce4c49d7d04 2017-08-14 04:18:38.848\n",
"3039b018-e077-4127-b00b-eb7dc83b4925 2017-08-14 13:24:33.645\n",
"58b132d4-dfac-455b-b640-6f2b76e012a5 2017-08-14 13:24:33.927\n",
"3415a49e-f377-47f5-bfde-d62dffa9eae7 2017-08-14 13:24:36.554\n",
"1e738b8c-da2e-485e-b9cb-8fef08aca543 2017-08-14 13:24:37.039\n",
"f33a5517-3480-4a27-a988-5bec22553218 2017-08-14 13:24:37.253\n",
"5fa8dd3a-6d46-4e13-b68a-a7b4b23951d9 2017-08-14 13:26:18.987\n",
"d7902956-2080-4c8a-b0ac-70e1c4786483 2017-08-14 13:26:22.780\n",
"6d8c347e-f10a-4845-9113-4a8ea0a2d65d 2017-08-14 13:26:23.773\n",
"8cb85b52-0429-465a-94f8-0ae5f77a0ebe 2017-08-16 02:08:15.045\n",
"7f045c94-d5ad-4407-9ac2-339b13b38b2e 2017-08-16 02:08:16.423\n",
"e92a1806-eed2-4f75-964a-30ca0e12bfcc 2017-08-16 13:03:07.176\n",
"3429047b-7ed8-469f-bca3-0834be0d5294 2017-08-16 13:05:09.771\n",
"b5a8a271-1081-4a47-9fa1-b2431e170b5f 2017-08-18 03:24:22.654\n",
"1acd08a7-5ad0-40a7-a8b1-0664672c1394 2017-08-18 03:24:28.982\n",
"dd509ff1-d256-44f0-bab9-460c0856e6e6 2017-08-18 03:36:25.663\n",
"446987a5-7c3b-4db3-bbc7-b0f58d1d3f01 2017-08-18 03:36:26.587\n",
"7cac49d9-c3c1-4144-8727-a539084f1b43 2017-08-18 03:36:26.798\n",
"fa1b4a81-797b-4932-8d70-ecbdb776f0a3 2017-08-18 03:38:08.918\n",
"a79b4e08-8751-4a17-97e4-f0f68310c141 2017-08-18 03:38:12.525\n",
"4dd45cfb-8bec-493a-8b18-0cf7c8286ee5 2017-08-18 03:38:12.730\n",
"57af6b4c-9b2f-47bc-9cc8-24ca96b9809d 2017-08-18 12:56:49.650\n",
"570c2848-1309-4a74-9399-73b079df5c93 2017-08-18 12:56:49.977\n",
"Name: ingestiondate, Length: 100, dtype: datetime64[ns]"
]
},
"execution_count": 35,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_ordered.sort_values(by=\"ingestiondate\", ascending=True)[\"ingestiondate\"]"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/plain": [
"89cf90c2-85ab-4462-a659-3932c9d2b291 2017-08-19 04:44:32.874\n",
"026ab034-b8ff-4980-8983-a8b55243e517 2017-08-19 04:44:33.758\n",
"7155977e-1222-4cb4-81a1-8ea891cdc96d 2017-08-19 04:44:33.978\n",
"da322672-c431-4633-b34e-a9f0e114090a 2017-08-19 04:44:34.624\n",
"b940ed97-9080-4b7b-99fa-b167bf9ab59c 2017-08-19 13:22:20.286\n",
"341e9119-2ff9-413d-a5a2-fdb66a8ab6da 2017-08-19 13:35:46.579\n",
"92fbd168-4956-43d8-bb3d-70e2073aae36 2017-08-19 13:35:56.865\n",
"d19d01c2-a7a4-4f04-949a-d770ccc01279 2017-08-19 13:36:48.186\n",
"d59d4741-15e1-4493-8b6e-fda920820e02 2017-08-19 13:36:51.909\n",
"11acd86d-0728-4baf-a80d-92f838049662 2017-08-19 13:37:11.176\n",
"85a0c84a-b621-4597-a391-8224ea9330f5 2017-08-19 13:37:24.861\n",
"9a51b938-aecb-4133-ae27-f9250d14a91d 2017-08-19 13:37:58.651\n",
"5010c2a8-17c9-4dd0-877c-a4e686e4f56a 2017-08-20 01:34:11.680\n",
"e0e8af79-3eb8-4c7b-9fc2-3aedc708567f 2017-08-21 04:38:11.890\n",
"56b8985b-5d46-43a4-aba8-a722816aa8e4 2017-08-21 04:38:14.685\n",
"a65449c0-82d8-4385-8cca-c0277899cb32 2017-08-21 04:38:17.528\n",
"e29a2ade-bd32-4c49-a1d0-535333d78fd4 2017-08-21 04:52:22.599\n",
"fb04efd1-8d70-4d4a-97a5-6149b68c7a6e 2017-08-21 13:41:57.282\n",
"84ae7125-4c82-4fdd-98d8-f8145951a8cf 2017-08-21 13:42:02.740\n",
"22d18f48-81e8-44dd-b1db-6a8451fa6e59 2017-08-21 13:42:45.248\n",
"33dd0c1c-a07d-476b-b94a-4b4131d86044 2017-08-21 13:43:00.024\n",
"4fe10b19-e7d2-422b-8048-ca5ebc3aa8bf 2017-08-23 04:32:49.905\n",
"5abc0bdd-17c3-420d-b2ab-20c354f12893 2017-08-23 04:34:29.927\n",
"c374891f-bfca-465e-979e-a0fdcb784716 2017-08-23 04:34:47.199\n",
"4e1ec812-6e03-44a5-bc06-5b635da7e129 2017-08-23 04:34:48.080\n",
"ba058be3-5324-4b01-8a7a-ba3d3a671dfa 2017-08-23 04:34:48.298\n",
"59ec190e-4a6f-4af9-888f-e0ef656f9472 2017-08-23 13:02:54.063\n",
"ffc31868-30ca-40b2-9a5d-6bc3dfe2a323 2017-08-23 13:02:54.373\n",
"2e924f6f-e1ce-400b-8520-1e2077cd4ffa 2017-08-23 13:02:54.506\n",
"fe9326e8-75e0-4c79-846d-16919b224f50 2017-08-24 04:24:37.069\n",
" ... \n",
"e84ec47c-fcad-4298-8ec0-bd93912236fc 2017-08-26 13:26:21.822\n",
"212e194c-34c8-429d-9449-61b557da5bd2 2017-08-26 13:26:23.588\n",
"f94da848-b1fd-4865-9511-48e426c29724 2017-08-26 13:26:23.813\n",
"6a5dc3aa-97a5-4b4c-b271-e20e95c9af6d 2017-08-26 13:26:24.500\n",
"24f7ae96-fdbf-4996-b4d3-a8226b9b7aed 2017-08-28 02:08:09.715\n",
"cd5b750d-b681-449a-99af-e1993ebaba5b 2017-08-28 02:08:14.150\n",
"cb6861a2-a082-46f2-8f3c-cb32b1b01b00 2017-08-28 13:34:28.793\n",
"d442164e-e679-4c62-ad76-b8f722713987 2017-08-28 13:34:35.831\n",
"fee7729a-636b-43fa-82ea-1478590e0c84 2017-08-30 03:40:21.288\n",
"fd4e6fb1-beb0-4834-9332-416e28ffe02c 2017-08-30 03:40:22.010\n",
"37973d60-8dc8-4470-b8e9-476784ecd2a6 2017-08-30 03:40:22.319\n",
"e1c72e00-96b3-4eba-b9e7-c5e27783ade3 2017-08-30 03:40:23.248\n",
"1af0ec25-7d89-4a13-8334-c17ba280cce2 2017-08-30 03:42:16.084\n",
"9a0f7453-f8af-4265-951c-89f15f8808f1 2017-08-30 03:42:16.424\n",
"980967d2-9505-4cfe-91a2-af83884d7c41 2017-08-30 03:42:16.591\n",
"f8203295-c440-429f-8ac2-c6c6642ae3e2 2017-08-30 04:02:08.813\n",
"72c855d3-7623-476b-a5bc-5810efe1182b 2017-08-30 12:42:44.535\n",
"97716c9e-5e55-4f8f-89db-01e98dd64929 2017-08-31 06:32:21.203\n",
"cfad23f5-b00b-4b4d-9514-7ec0d3b5508b 2017-08-31 06:34:26.786\n",
"974f2faa-ade2-4579-bd58-965082bce640 2017-08-31 06:34:30.111\n",
"ed11cef7-a920-4fc8-adad-1d429a4e8954 2017-08-31 06:34:30.835\n",
"69c297b4-cc8c-4285-8106-8b38a615ba14 2017-08-31 17:58:46.189\n",
"10839c2d-b865-489e-b25e-a77670bf530b 2017-08-31 17:58:48.261\n",
"e67e8877-6f53-4aea-b783-ee490c78f0ea 2017-08-31 17:59:34.038\n",
"3062b18e-13f5-4f9f-b4ec-ac937410e630 2017-08-31 17:59:45.167\n",
"4d60d407-0fd6-448f-aea5-0438690097aa 2017-08-31 18:02:30.969\n",
"37979890-b46a-4204-a628-c80556c97164 2017-08-31 18:05:30.728\n",
"cefe2060-5bee-4ea9-9da4-b6ac89eddc46 2017-08-31 18:07:07.679\n",
"80f7c36f-88c0-4c02-a98f-1fb7367733f7 2017-08-31 18:07:17.640\n",
"a12e809e-661c-4778-a93e-60db52588877 2017-09-01 01:32:10.000\n",
"Name: ingestiondate, Length: 83, dtype: datetime64[ns]"
]
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_diff.sort_values(by=\"ingestiondate\", ascending=True)[\"ingestiondate\"]"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env:sensat-dev]",
"language": "python",
"name": "conda-env-sensat-dev-py"
},
"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.5.4"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment