def _get_valid_sqlite_name(name):
    # See http://stackoverflow.com/questions/6514274/how-do-you-escape-strings\
    # -for-sqlite-table-column-names-in-python
    # Ensure the string can be encoded as UTF-8.
    # Ensure the string does not include any NUL characters.
    # Replace all " with "".
    # Wrap the entire thing in double quotes.

    uname = _get_unicode_name(name)
    if not len(uname):
        raise ValueError("Empty table or column name specified")

    nul_index = uname.find("\x00")
    if nul_index >= 0:
        raise ValueError('SQLite identifier cannot contain NULs')
    return '"' + uname.replace('"', '""') + '"'


# SQL enquote and wildcard symbols
dataset/ETHPy150Open pydata/pandas/pandas/io/sql.py/_get_valid_sqlite_name/original