{"id":46709,"date":"2022-05-13T00:00:00","date_gmt":"2022-05-13T07:00:00","guid":{"rendered":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/blog\/griddb-python-client-adds-new-time-series-functions\/"},"modified":"2025-11-13T12:56:04","modified_gmt":"2025-11-13T20:56:04","slug":"griddb-python-client-adds-new-time-series-functions","status":"publish","type":"post","link":"https:\/\/griddb.net\/en\/blog\/griddb-python-client-adds-new-time-series-functions\/","title":{"rendered":"GridDB Python Client Adds New Time Series Functions"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>A new version of the GridDB Python client has been released which adds some new time series functions. Though these functions are new to the python client, they have been available for use in the native GridDB language (java) and through <code>TQL<\/code> strings\/queries prior to this release.<\/p>\n<p>As to why this is a helpful update: it is much simpler to use these functions compared to their TQL equivalents. You can read more about the TQL queries <a href=\"http:\/\/www.toshiba-sol.co.jp\/en\/pro\/griddb\/docs-en\/v4_3\/GridDB_TQL_Reference.html\">here<\/a>.<\/p>\n<p>Now, let&#8217;s move on to what we will discuss in this blog: we will walk through the uses for these functions, how to use them, and display some examples using a freely available data set from <a href=\"https:\/\/www.kaggle.com\/datasets\/census\/population-time-series-data\">kaggle<\/a>. These are <code>aggregate_time_series<\/code>, <code>query_by_time_series_range<\/code>, and <code>query_by_time_series_sampling<\/code>.<\/p>\n<p>We will also have a brief section showing how to ingest the data from the <code>csv<\/code> file using Java. To add to that, we will also share a <code>Dockerfile<\/code> which will contain all instructions to building and running the new python client.<\/p>\n<h2>Installing Python Client<\/h2>\n<p>You will of course need to have GridDB installed on to your machine. Instructions for that can be found here: <a href=\"https:\/\/docs.griddb.net\/gettingstarted\/using-apt\/\">docs<\/a>.<\/p>\n<p>According to the <a href=\"https:\/\/github.com\/griddb\/python_client\">GridDB Python Client github<\/a> page, these are the environment requirements for CentOS:<\/p>\n<pre><code>OS: CentOS 7.6(x64) (GCC 4.8.5)\nSWIG: 3.0.12\nPython: 3.6\nGridDB C client: V4.5 CE(Community Edition)\nGridDB server: V4.5 CE, CentOS 7.6(x64) (GCC 4.8.5)\n<\/code><\/pre>\n<h3>Dockerfile<\/h3>\n<p>The <code>Dockerfile<\/code> which we have prepared will build\/make all prereqs and then run whichever Python script you feed into it at the bottom of the file.<\/p>\n<p>To make things easy, you can simply pull from Dockerhub:<\/p>\n<p><code>docker pull griddbnet\/python-client-v0.8.5:latest<\/code><\/p>\n<p>Here is the file in its entirety:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">FROM centos:7\n\nRUN yum -y groupinstall \"Development Tools\"\nRUN yum -y install epel-release wget\nRUN yum -y install pcre2-devel.x86_64\nRUN yum -y install openssl-devel libffi-devel bzip2-devel -y\nRUN yum -y install xz-devel  perl-core zlib-devel -y\nRUN yum -y install numpy scipy\n\n# Make c_client\nWORKDIR \/\nRUN wget --no-check-certificate https:\/\/github.com\/griddb\/c_client\/archive\/refs\/tags\/v4.6.0.tar.gz\nRUN tar -xzvf v4.6.0.tar.gz\nWORKDIR \/c_client-4.6.0\/client\/c\nRUN  .\/bootstrap.sh\nRUN .\/configure\nRUN make\nWORKDIR \/c_client-4.6.0\/bin\nENV LIBRARY_PATH ${LIBRARY_PATH}:\/c_client-4.6.0\/bin\nENV LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:\/c_client-4.6.0\/bin\n\n# Make SSL for Python3.10\nWORKDIR \/\nRUN wget  --no-check-certificate https:\/\/www.openssl.org\/source\/openssl-1.1.1c.tar.gz\nRUN tar -xzvf openssl-1.1.1c.tar.gz\nWORKDIR \/openssl-1.1.1c\nRUN .\/config --prefix=\/usr --openssldir=\/etc\/ssl --libdir=lib no-shared zlib-dynamic\nRUN make\nRUN make test\nRUN make install\n\n# Build Python3.10\nWORKDIR \/\nRUN wget https:\/\/www.python.org\/ftp\/python\/3.10.4\/Python-3.10.4.tgz\nRUN tar xvf Python-3.10.4.tgz\nWORKDIR \/Python-3.10.4\nRUN .\/configure --enable-optimizations  -C --with-openssl=\/usr --with-openssl-rpath=auto --prefix=\/usr\/local\/python-3.version\nRUN make install\nENV PATH ${PATH}:\/usr\/local\/python-3.version\/bin\n\nRUN python3 -m pip install pandas\n\n# Make Swig\nWORKDIR \/\nRUN wget https:\/\/github.com\/swig\/swig\/archive\/refs\/tags\/v4.0.2.tar.gz\nRUN tar xvfz v4.0.2.tar.gz\nWORKDIR \/swig-4.0.2\nRUN chmod +x autogen.sh\nRUN .\/autogen.sh\nRUN .\/configure\nRUN make\nRUN make install\nWORKDIR \/\n\n# Make Python Client\nRUN wget https:\/\/github.com\/griddb\/python_client\/archive\/refs\/tags\/0.8.5.tar.gz\nRUN tar xvf 0.8.5.tar.gz\nWORKDIR \/python_client-0.8.5\nRUN make\nENV PYTHONPATH \/python_client-0.8.5\n\nWORKDIR \/app\n\nCOPY time_series_example.py \/app\nENTRYPOINT [\"python3\", \"-u\", \"time_series_example.py\"]<\/code><\/pre>\n<\/div>\n<p>If you want to install the python client onto your machine without using containers, you can of course simply follow the procedure laid out in the file&#8217;s instructions.<\/p>\n<p>When using this container, you can either run a <a href=\"https:\/\/griddb.net\/en\/blog\/improve-your-devops-with-griddb-server-and-client-docker-containers\/\">second container which will host a GridDB Server<\/a>, or you can use your currently running GridDB instance. This can be accomplished by using the <code>network<\/code> flag while running your docker image:<\/p>\n<p><code>docker run -it --network host --name python_client &lt;image id&gt;<\/code><\/p>\n<h2>Ingesting Data<\/h2>\n<p>The dataset we&#8217;re using is downloadable on the <a href=\"https:\/\/www.kaggle.com\/datasets\/census\/population-time-series-data\">kaggle<\/a> website for free and is presented to us in <code>csv<\/code> form. To ingest this into our GridDB server, we will be using java as it is the native connector, but of course ingesting via python is also feasible.<\/p>\n<p>You can download the java code to ingest the data yourself from our <a href=\"\">Github Repo<\/a><\/p>\n<h2>Time Series Functionality<\/h2>\n<p>The three functions which have been added to this GridDB connector ( <code>aggregate_time_series<\/code>, <code>query_by_time_series_range<\/code>, <code>query_by_time_series_sampling<\/code>) are useful in their own unique ways. In general though, these sorts of functions really help developers\/engineers to do meaningful analysis through gaining statistical insights into large datasets.<\/p>\n<p>For the remainder of this blog, we will walk through each function one-by-one and showcase running it against our dataset and hopefully illuminate why it is needed.<\/p>\n<p>To start, we will connect to our GridDB server with Python; it is not that dissimilar to connecting using java.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">#!\/usr\/bin\/python\n\nimport griddb_python as griddb\nimport sys\nimport calendar\nimport datetime\n\nfactory = griddb.StoreFactory.get_instance()\n\n#Get GridStore object\nstore = factory.get_store(\n    host=\"239.0.0.1\",\n    port=31999,\n    cluster_name=\"defaultCluster\",\n    username=\"admin\",\n    password=\"admin\"\n)<\/code><\/pre>\n<\/div>\n<p>We will also need to fetch our newly made dataset to run our queries:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">ts = store.get_container(\"population\")\nquery = ts.query(\"select * from population where value > 327000\")\nrs = query.fetch()<\/code><\/pre>\n<\/div>\n<p>Because the time object in GridDB is in Unix time, attempting to ingest the dataset from before 1970 proved difficult: the time in MS ended up as negative numbers, resulting in GridDB errors. Since this is a demo, I simply opted to omit this data from the dataset.<\/p>\n<p>So, to avoid querying too many rows, as well as avoiding the missing data from before 1970, we will start our query with population over 280000 (these values are in thousands), which will put us at around 1999 (20+ years ago).<\/p>\n<p>This query will grab 20 years of data, but for simplicity sake, I will simply start from the first date which is over our query parameter and use the time series analysis since then.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">data = rs.next() #grabs just the first row from our entire query\ntimestamp = calendar.timegm(data[0].timetuple()) #data[0] is the timestamp\ngsTS = (griddb.TimestampUtils.get_time_millis(timestamp)) #converts the data to millis\ntime = datetime.datetime.fromtimestamp(gsTS\/1000.0) # converts back to a usable java datetime obj for the time series functions<\/code><\/pre>\n<\/div>\n<h3>Aggregate Time Series<\/h3>\n<p>The <code>aggregation<\/code> functionality is a bit unique as it will return an <code>AggregationResult<\/code> instead of a set of rows as the other queries do. These results can grab values of <code>min, max, total, average, variance, standard deviation, count, and weighted average<\/code>.<\/p>\n<p>Let&#8217;s walk through these examples. First, some preliminary variables need to be set:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">data = rs.next()\nyear_in_mili = 31536000000 # this is one year in miliseconds\nadded = gsTS + (year_in_mili * 7) # 7 years after our start time (this is end time)\naddedTime = datetime.datetime.fromtimestamp(added\/1000.0) # converting to datetime obj as this is what the function expects<\/code><\/pre>\n<\/div>\n<p>Here you can see we use the start time as the first row returned from our query, and then the end time as 7 years later.<\/p>\n<p>So, if we set the aggregation type to min, the function will return the minimum value from the dataset (the smallest number). The max will do the opposite &#8212; the largest integer from the result. Total will take the sum of all values and return that to you.<\/p>\n<p><code>AggregationResult<\/code> is the return type, and the parameters expected look like this: <code>aggregate_time_series(object start, object end, Aggregation type, string column_name=None)<\/code>. This is what it looks like fully formed:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">total = ts.aggregate_time_series(time, addedTime, griddb.Aggregation.TOTAL, \"value\")\nprint(\"TOTAL: \", total.get(griddb.Type.LONG))<\/code><\/pre>\n<\/div>\n<p><code>TOTAL:  48714984<\/code><\/p>\n<p>The average is also the mean, it simply takes the total sum of all values divided by the count.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">avg = ts.aggregate_time_series(time, addedTime, griddb.Aggregation.AVERAGE, \"value\")\nprint(\"AVERAGE: \", avg.get(griddb.Type.LONG))<\/code><\/pre>\n<\/div>\n<p><code>AVERAGE:  289970<\/code><\/p>\n<p>The average between 1999 and 2006 was about 290 million.<\/p>\n<p>Variance is mathematically defined as: the average of the squared differences from the mean. This essentially means how different each number is different from the mean\/average.<\/p>\n<p>Standard deviation is similar to variance, it &#8220;is a statistical measurement that looks at how far a group of numbers is from the mean. Put simply, standard deviation measures how far apart numbers are in a data set.&#8221; It is usually used to analyze how closely related the numbers are to the mean.<\/p>\n<p>The last one worth discussing here is the weighted average. A weighted average attempts to quantify the importance of some values over others in the average. In the case of time series data, it generally measures the time space between two data points and tries to weigh that. For this specific dataset, each data point is exactly 1 month apart, so unfortunately the number that is produced by our query is the same as our average:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">weightedAvg = ts.aggregate_time_series(time, addedTime, griddb.Aggregation.WEIGHTED_AVERAGE, \"value\")\nprint(\"WEIGHTED AVERAGE: \", weightedAvg.get(griddb.Type.LONG))<\/code><\/pre>\n<\/div>\n<p><code>WEIGHTED AVERAGE:  289970<\/code><\/p>\n<p>But if the time series datas was irregularly spaced, the number produced would have been different from our average. You can read more about this from a previous <a href=\"https:\/\/griddb.net\/en\/blog\/aggregation-with-griddb\/\">blog<\/a><\/p>\n<h3>Query Time Series Range<\/h3>\n<p>The query time series range will return a set of Rows type same as most other queries. The function looks like this: <code>query_by_time_series_range(object start, object end, QueryOrder order=QueryOrder.ASCENDING)<\/code>. It returns the row from the start time to the end time &#8212; essentially giving the developer an easy way to grab an explicit time range.<\/p>\n<p>Here&#8217;s the concrete example:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">rangeQuery = ts.query_by_time_series_range(time, addedTime, griddb.QueryOrder.ASCENDING)\nrangeRs = rangeQuery.fetch()\nwhile rangeRs.has_next():\n    d = rangeRs.next()\n    print(\"d: \", d)<\/code><\/pre>\n<\/div>\n<p>The results are simply the range:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">d:  [datetime.datetime(1999, 10, 1, 0, 0), 280203]\nd:  [datetime.datetime(1999, 10, 1, 7, 0), 280203]\nd:  [datetime.datetime(1999, 11, 1, 0, 0), 280471]\nd:  [datetime.datetime(1999, 11, 1, 8, 0), 280471]\nd:  [datetime.datetime(1999, 12, 1, 0, 0), 280716]\nd:  [datetime.datetime(1999, 12, 1, 8, 0), 280716]\nd:  [datetime.datetime(2000, 1, 1, 0, 0), 280976]\nd:  [datetime.datetime(2000, 1, 1, 8, 0), 280976]\nd:  [datetime.datetime(2000, 2, 1, 0, 0), 281190]\nd:  [datetime.datetime(2000, 2, 1, 8, 0), 281190]\nd:  [datetime.datetime(2000, 3, 1, 0, 0), 281409]\nd:  [datetime.datetime(2000, 3, 1, 8, 0), 281409]\nd:  [datetime.datetime(2000, 4, 1, 0, 0), 281653]\nd:  [datetime.datetime(2000, 4, 1, 8, 0), 281653]\nd:  [datetime.datetime(2000, 5, 1, 0, 0), 281877]\nd:  [datetime.datetime(2000, 5, 1, 7, 0), 281877]\nd:  [datetime.datetime(2000, 6, 1, 0, 0), 282126]\nd:  [datetime.datetime(2000, 6, 1, 7, 0), 282126]\nd:  [datetime.datetime(2000, 7, 1, 0, 0), 282385]\nd:  [datetime.datetime(2000, 7, 1, 7, 0), 282385]\nd:  [datetime.datetime(2000, 8, 1, 0, 0), 282653]\nd:  [datetime.datetime(2000, 8, 1, 7, 0), 282653]\nd:  [datetime.datetime(2000, 9, 1, 0, 0), 282932]\nd:  [datetime.datetime(2000, 9, 1, 7, 0), 282932]<\/code><\/pre>\n<\/div>\n<h3>Query By Time Series Sampling<\/h3>\n<p>The last of the new functions is, in my opinion, the most interesting. Thie sampling returns a uniform sample of rows which have a set time between each point.<\/p>\n<p>The time series sampling function also returns a set of Rows. It takes the most parameters of all the functions: <code>query_by_time_series_sampling(object start, object end, list[string] column_name_list, InterpolationMode mode, int interval, TimeUnit interval_unit)<\/code>. It also takes the start and end, but this time it takes a list of column names, and then an interpolation mode, and intervals and time units.<\/p>\n<p>For interpolation mode, you can choose either: <code>LINEAR_OR_PREVIOUS<\/code> or <code>EMPTY<\/code>. For the interval unit, the following choices are available: <code>YEAR,MONTH,DAY,HOUR,MINUTE,SECOND,MILLISECOND<\/code> but the year and month are too large and not allowed as intervals, so essentially you would choose an interval from day or below.<\/p>\n<p>Here is the concrete example ran for the blog:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">try:   \n    samplingQuery = ts.query_by_time_series_sampling(time, addedTime, [\"value\"], griddb.InterpolationMode.LINEAR_OR_PREVIOUS, 1, griddb.TimeUnit.DAY) # the columns need to be a list, hence the [ ]\n    samplingRs = samplingQuery.fetch()\n    while samplingRs.has_next(): \n        d = samplingRs.next()\n        print(\"sampling: \", d)\nexcept griddb.GSException as e:\n    for i in range(e.get_error_stack_size()):\n        print(\"[\", i, \"]\")\n        print(e.get_error_code(i))\n        print(e.get_message(i))<\/code><\/pre>\n<\/div>\n<p>The addedtime variable is 7 years after the initial, but here is just a small slice of the queries which were printed out:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">sampling:  [datetime.datetime(2006, 8, 1, 0, 0), 299263]\nsampling:  [datetime.datetime(2006, 8, 2, 0, 0), 299269]\nsampling:  [datetime.datetime(2006, 8, 3, 0, 0), 299279]\nsampling:  [datetime.datetime(2006, 8, 4, 0, 0), 299288]\nsampling:  [datetime.datetime(2006, 8, 5, 0, 0), 299298]\nsampling:  [datetime.datetime(2006, 8, 6, 0, 0), 299307]\nsampling:  [datetime.datetime(2006, 8, 7, 0, 0), 299317]\nsampling:  [datetime.datetime(2006, 8, 8, 0, 0), 299326]\nsampling:  [datetime.datetime(2006, 8, 9, 0, 0), 299336]\nsampling:  [datetime.datetime(2006, 8, 10, 0, 0), 299345]\nsampling:  [datetime.datetime(2006, 8, 11, 0, 0), 299354]\nsampling:  [datetime.datetime(2006, 8, 12, 0, 0), 299364]\nsampling:  [datetime.datetime(2006, 8, 13, 0, 0), 299373]\nsampling:  [datetime.datetime(2006, 8, 14, 0, 0), 299383]\nsampling:  [datetime.datetime(2006, 8, 15, 0, 0), 299392]\nsampling:  [datetime.datetime(2006, 8, 16, 0, 0), 299402]\nsampling:  [datetime.datetime(2006, 8, 17, 0, 0), 299411]\nsampling:  [datetime.datetime(2006, 8, 18, 0, 0), 299421]\nsampling:  [datetime.datetime(2006, 8, 19, 0, 0), 299430]\nsampling:  [datetime.datetime(2006, 8, 20, 0, 0), 299440]\nsampling:  [datetime.datetime(2006, 8, 21, 0, 0), 299449]\nsampling:  [datetime.datetime(2006, 8, 22, 0, 0), 299459]\nsampling:  [datetime.datetime(2006, 8, 23, 0, 0), 299468]\nsampling:  [datetime.datetime(2006, 8, 24, 0, 0), 299478]\nsampling:  [datetime.datetime(2006, 8, 25, 0, 0), 299487]\nsampling:  [datetime.datetime(2006, 8, 26, 0, 0), 299497]\nsampling:  [datetime.datetime(2006, 8, 27, 0, 0), 299506]\nsampling:  [datetime.datetime(2006, 8, 28, 0, 0), 299516]\nsampling:  [datetime.datetime(2006, 8, 29, 0, 0), 299525]\nsampling:  [datetime.datetime(2006, 8, 30, 0, 0), 299535]\nsampling:  [datetime.datetime(2006, 8, 31, 0, 0), 299544]\nsampling:  [datetime.datetime(2006, 9, 1, 0, 0), 299554]\nsampling:  [datetime.datetime(2006, 9, 2, 0, 0), 299560]\nsampling:  [datetime.datetime(2006, 9, 3, 0, 0), 299570]\nsampling:  [datetime.datetime(2006, 9, 4, 0, 0), 299579]\nsampling:  [datetime.datetime(2006, 9, 5, 0, 0), 299589]\nsampling:  [datetime.datetime(2006, 9, 6, 0, 0), 299598]\nsampling:  [datetime.datetime(2006, 9, 7, 0, 0), 299607]\nsampling:  [datetime.datetime(2006, 9, 8, 0, 0), 299617]\nsampling:  [datetime.datetime(2006, 9, 9, 0, 0), 299626]\nsampling:  [datetime.datetime(2006, 9, 10, 0, 0), 299636]<\/code><\/pre>\n<\/div>\n<p>The original dataset provides us with the population numbers for the first of every month. And with the sampling, we can extrapolate the population values on a per-day basis. We can see, based on the data, the values we do have from kaggle, are correct, and the population leading up to those days are reasonable. For example, 09\/01\/2006 has a population value of 299554, which matches our kaggle data, and the day before has a value of 299544.<\/p>\n<h2>Conclusion<\/h2>\n<p>This blog has demonstrated how to build a new python client, either through docker, or through following the step by step instructions in the Dockerfile. A very simple data ingestion from a <code>csv<\/code> file was also demonstrated (via java). And lastly, we have shown how useful the new time series functions can be in your time series analysis.<\/p>\n<p>Full code for this blog can be found here: <a href=\"https:\/\/github.com\/griddbnet\/Blogs\/tree\/new-python-agg\">download<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction A new version of the GridDB Python client has been released which adds some new time series functions. Though these functions are new to the python client, they have been available for use in the native GridDB language (java) and through TQL strings\/queries prior to this release. As to why this is a helpful [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":26149,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[121],"tags":[],"class_list":["post-46709","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>GridDB Python Client Adds New Time Series Functions | GridDB: Open Source Time Series Database for IoT<\/title>\n<meta name=\"description\" content=\"Introduction A new version of the GridDB Python client has been released which adds some new time series functions. Though these functions are new to the\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/griddb.net\/en\/blog\/griddb-python-client-adds-new-time-series-functions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"GridDB Python Client Adds New Time Series Functions | GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"og:description\" content=\"Introduction A new version of the GridDB Python client has been released which adds some new time series functions. Though these functions are new to the\" \/>\n<meta property=\"og:url\" content=\"https:\/\/griddb.net\/en\/blog\/griddb-python-client-adds-new-time-series-functions\/\" \/>\n<meta property=\"og:site_name\" content=\"GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/griddbcommunity\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-05-13T07:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-13T20:56:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/08\/python-blog.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1160\" \/>\n\t<meta property=\"og:image:height\" content=\"653\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Israel\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:site\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Israel\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/griddb.net\/en\/blog\/griddb-python-client-adds-new-time-series-functions\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/griddb-python-client-adds-new-time-series-functions\/\"},\"author\":{\"name\":\"Israel\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/c8a430e7156a9e10af73b1fbb46c2740\"},\"headline\":\"GridDB Python Client Adds New Time Series Functions\",\"datePublished\":\"2022-05-13T07:00:00+00:00\",\"dateModified\":\"2025-11-13T20:56:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/griddb-python-client-adds-new-time-series-functions\/\"},\"wordCount\":1309,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/griddb-python-client-adds-new-time-series-functions\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2019\/08\/python-blog.png\",\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/griddb.net\/en\/blog\/griddb-python-client-adds-new-time-series-functions\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/griddb.net\/en\/blog\/griddb-python-client-adds-new-time-series-functions\/\",\"url\":\"https:\/\/griddb.net\/en\/blog\/griddb-python-client-adds-new-time-series-functions\/\",\"name\":\"GridDB Python Client Adds New Time Series Functions | GridDB: Open Source Time Series Database for IoT\",\"isPartOf\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/griddb-python-client-adds-new-time-series-functions\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/griddb-python-client-adds-new-time-series-functions\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2019\/08\/python-blog.png\",\"datePublished\":\"2022-05-13T07:00:00+00:00\",\"dateModified\":\"2025-11-13T20:56:04+00:00\",\"description\":\"Introduction A new version of the GridDB Python client has been released which adds some new time series functions. Though these functions are new to the\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/griddb.net\/en\/blog\/griddb-python-client-adds-new-time-series-functions\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/griddb.net\/en\/blog\/griddb-python-client-adds-new-time-series-functions\/#primaryimage\",\"url\":\"\/wp-content\/uploads\/2019\/08\/python-blog.png\",\"contentUrl\":\"\/wp-content\/uploads\/2019\/08\/python-blog.png\",\"width\":1160,\"height\":653},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website\",\"url\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/\",\"name\":\"GridDB: Open Source Time Series Database for IoT\",\"description\":\"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL\",\"publisher\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization\",\"name\":\"Fixstars\",\"url\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"contentUrl\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"width\":200,\"height\":83,\"caption\":\"Fixstars\"},\"image\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/griddbcommunity\/\",\"https:\/\/x.com\/GridDBCommunity\",\"https:\/\/www.linkedin.com\/company\/griddb-by-toshiba\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/c8a430e7156a9e10af73b1fbb46c2740\",\"name\":\"Israel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4df8cfc155402a2928d11f80b0220037b8bd26c4f1b19c4598d826e0306e6307?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4df8cfc155402a2928d11f80b0220037b8bd26c4f1b19c4598d826e0306e6307?s=96&d=mm&r=g\",\"caption\":\"Israel\"},\"url\":\"https:\/\/griddb.net\/en\/author\/israel\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"GridDB Python Client Adds New Time Series Functions | GridDB: Open Source Time Series Database for IoT","description":"Introduction A new version of the GridDB Python client has been released which adds some new time series functions. Though these functions are new to the","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/griddb.net\/en\/blog\/griddb-python-client-adds-new-time-series-functions\/","og_locale":"en_US","og_type":"article","og_title":"GridDB Python Client Adds New Time Series Functions | GridDB: Open Source Time Series Database for IoT","og_description":"Introduction A new version of the GridDB Python client has been released which adds some new time series functions. Though these functions are new to the","og_url":"https:\/\/griddb.net\/en\/blog\/griddb-python-client-adds-new-time-series-functions\/","og_site_name":"GridDB: Open Source Time Series Database for IoT","article_publisher":"https:\/\/www.facebook.com\/griddbcommunity\/","article_published_time":"2022-05-13T07:00:00+00:00","article_modified_time":"2025-11-13T20:56:04+00:00","og_image":[{"width":1160,"height":653,"url":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/08\/python-blog.png","type":"image\/png"}],"author":"Israel","twitter_card":"summary_large_image","twitter_creator":"@GridDBCommunity","twitter_site":"@GridDBCommunity","twitter_misc":{"Written by":"Israel","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/griddb.net\/en\/blog\/griddb-python-client-adds-new-time-series-functions\/#article","isPartOf":{"@id":"https:\/\/griddb.net\/en\/blog\/griddb-python-client-adds-new-time-series-functions\/"},"author":{"name":"Israel","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/c8a430e7156a9e10af73b1fbb46c2740"},"headline":"GridDB Python Client Adds New Time Series Functions","datePublished":"2022-05-13T07:00:00+00:00","dateModified":"2025-11-13T20:56:04+00:00","mainEntityOfPage":{"@id":"https:\/\/griddb.net\/en\/blog\/griddb-python-client-adds-new-time-series-functions\/"},"wordCount":1309,"commentCount":0,"publisher":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization"},"image":{"@id":"https:\/\/griddb.net\/en\/blog\/griddb-python-client-adds-new-time-series-functions\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2019\/08\/python-blog.png","articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/griddb.net\/en\/blog\/griddb-python-client-adds-new-time-series-functions\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/griddb.net\/en\/blog\/griddb-python-client-adds-new-time-series-functions\/","url":"https:\/\/griddb.net\/en\/blog\/griddb-python-client-adds-new-time-series-functions\/","name":"GridDB Python Client Adds New Time Series Functions | GridDB: Open Source Time Series Database for IoT","isPartOf":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/griddb.net\/en\/blog\/griddb-python-client-adds-new-time-series-functions\/#primaryimage"},"image":{"@id":"https:\/\/griddb.net\/en\/blog\/griddb-python-client-adds-new-time-series-functions\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2019\/08\/python-blog.png","datePublished":"2022-05-13T07:00:00+00:00","dateModified":"2025-11-13T20:56:04+00:00","description":"Introduction A new version of the GridDB Python client has been released which adds some new time series functions. Though these functions are new to the","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/griddb.net\/en\/blog\/griddb-python-client-adds-new-time-series-functions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/griddb.net\/en\/blog\/griddb-python-client-adds-new-time-series-functions\/#primaryimage","url":"\/wp-content\/uploads\/2019\/08\/python-blog.png","contentUrl":"\/wp-content\/uploads\/2019\/08\/python-blog.png","width":1160,"height":653},{"@type":"WebSite","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website","url":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/","name":"GridDB: Open Source Time Series Database for IoT","description":"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL","publisher":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization","name":"Fixstars","url":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/logo\/image\/","url":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","contentUrl":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","width":200,"height":83,"caption":"Fixstars"},"image":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/griddbcommunity\/","https:\/\/x.com\/GridDBCommunity","https:\/\/www.linkedin.com\/company\/griddb-by-toshiba"]},{"@type":"Person","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/c8a430e7156a9e10af73b1fbb46c2740","name":"Israel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4df8cfc155402a2928d11f80b0220037b8bd26c4f1b19c4598d826e0306e6307?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4df8cfc155402a2928d11f80b0220037b8bd26c4f1b19c4598d826e0306e6307?s=96&d=mm&r=g","caption":"Israel"},"url":"https:\/\/griddb.net\/en\/author\/israel\/"}]}},"_links":{"self":[{"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/posts\/46709","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/comments?post=46709"}],"version-history":[{"count":1,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/posts\/46709\/revisions"}],"predecessor-version":[{"id":51381,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/posts\/46709\/revisions\/51381"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/media\/26149"}],"wp:attachment":[{"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/media?parent=46709"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/categories?post=46709"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/tags?post=46709"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}