'Delete series from a database.
Series can be filtered by measurement and tags.
:param database: the database from which the series should be
deleted, defaults to client\'s current database
:type database: str
:param measurement: Delete all series from a measurement
:type measurement: str
:param tags: Delete all series that match given tags
:type tags: dict'

def delete_series(self, database=None, measurement=None, tags=None):

    database = (database or self._database)
    query_str = u'DROP    SERIES'
    if measurement:
        query_str += u'    FROM    {0}'.format(quote_ident(measurement))
    if tags:
        tag_eq_list = [u'{0}={1}'.format(quote_ident(k), quote_literal(v)) for (k, v) in tags.items()]
        query_str += (u'    WHERE    ' + u'    AND    '.join(tag_eq_list))
    self.query(query_str, database=database)
