From 4b7df688bfd3c6f261b49a2cc51a8e637a39fa85 Mon Sep 17 00:00:00 2001 From: Giacomo Barone Date: Wed, 26 Feb 2020 17:35:41 +0100 Subject: [PATCH 1/7] index on (no branch): 3549440 Merge pull request #3 from buildnn/v0.1.1 --- README.md | 41 +++++++++++++++++++++++------------------ dsdb/_utils_dsdb.py | 12 +++++------- setup.cfg | 2 ++ setup.py | 28 ++++++++++++++-------------- 4 files changed, 44 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 578189f..d54a370 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # Welcome to `dsdb` -> Dsdb is a [Buildnn](https://www.buildnn.com) open source project. +Dsdb is a [Buildnn](https://www.buildnn.com) open source project. -Tired of having to manage thousands of unstructured .csv outputs for your small Data Science experiments? Would you like to experience a real SQL-like data management of yout datasets with a real database? +Tired of having to manage thousands of unstructured .csv outputs for your small Data Science experiments? Would you like to experience a real SQL-like data management of yout datasets with a real database? Take a look at what you can do with [Postgres](https://www.pgadmin.org/screenshots/#7). @@ -30,6 +30,7 @@ with DsDbConnect() as con: df.to_sql_table('table', con=con, if_exist='append') ``` + and... that's it. To load data from the db: ```python @@ -37,23 +38,23 @@ with DsDbConnect() as con: df_read = pd.read_sql_table('test', con) ``` - ## Quickstart using docker-compose The following workflow launches a dockerized `jupyter` server with an underlying db. -Firs, retrieve our pre-made `docker-compose.yml` file: +Firs, retrieve our pre-made `docker-compose.yml` file: + ```bash -$ cd my-project-dir -$ wget https://raw.githubusercontent.com/buildnn/dsdb/master/docker-compose.yml -$ wget https://raw.githubusercontent.com/buildnn/dsdb/master/notebooks/dsdb_test.ipynb -$ touch .env +cd my-project-dir +wget https://raw.githubusercontent.com/buildnn/dsdb/master/docker-compose.yml +wget https://raw.githubusercontent.com/buildnn/dsdb/master/notebooks/dsdb_test.ipynb +touch .env ``` Open the `.env` file and place the following text, filling the `{text under curly brackets}` as suggested: _content of the `.env` file -->_ -``` +```ini DSDB_USER=datascientist DSDB_PASSWORD={your password} DSDB_DB=dsdb @@ -65,36 +66,40 @@ POSTGRES_DB=mydb PGADMIN_DEFAULT_EMAIL={your email} PGADMIN_DEFAULT_PASSWORD={another different password} ``` + And then start the game -``` -$ docker-compose up + +```bash +docker-compose up ``` And... **that should be it**. Visit: + * `https://localhost:8888` to see jupyter * `https://localhost:5050` to visit the pgadmin panel (use the credentials in .env) - ## Pip Installation To pip-install this repo: + ```bash -$ pip install git+https://github.com/buildnn/dsdb.git +pip install dsdb ``` -## Connection to a custom DB server +## Connection to a custom DB server `dsdb.DsDbConnect` uses a `DsDb` object to connect to your db. It loads some **environment variables** and uses them to perform the connection. these are + * `DSDB_USER`: your username in the DB * `DSDB_PASSWORD`: your password to access the DB -* `DSDB_DB`: The name of the DB +* `DSDB_DB`: The name of the DB * `DSDB_HOST`: The address of the DB server -* `DSDB_DRIVER`: The driver. E.g. `'postgres+psycopg2'` for a standard postgres. +* `DSDB_DRIVER`: The driver. E.g. `'postgres+psycopg2'` for a standard postgres. The following is a quick way to create them directly inside yout python script: @@ -110,7 +115,7 @@ os.environ['DSDB_HOST'] = 'localhost:5432' # server address os.environ['DSDB_DRIVER'] = 'postgres+psycopg2' ... -``` +``` another option is to create a custom `dsdb.DsDb` object to pass to `dsdb.DsDbConnect`: @@ -128,4 +133,4 @@ db = dsdb.DsDb( with dsdb.DsDbConnect(db=db) as con: df.to_sql_table('table', con=con) ... -``` +``` diff --git a/dsdb/_utils_dsdb.py b/dsdb/_utils_dsdb.py index 71b51c3..4e14151 100755 --- a/dsdb/_utils_dsdb.py +++ b/dsdb/_utils_dsdb.py @@ -7,9 +7,11 @@ import attr from sqlalchemy import create_engine + def return_pwd(*args): return "pwd is hidden" + @attr.s class DsDb(object): usr = attr.ib(default=None) @@ -27,13 +29,8 @@ def create_engine(self): pwd = self.pwd if self.pwd else os.getenv("DSDB_PASSWORD") self.engine = create_engine( - '{}://{}:{}@{}/{}'.format( - driver, - usr, - pwd, - host, - db, - ), echo=False) + "{}://{}:{}@{}/{}".format(driver, usr, pwd, host, db,), echo=False + ) return self.engine def connect(self): @@ -47,6 +44,7 @@ def close(self): self.con.close() return self + @contextlib.contextmanager def DsDbConnect(db=DsDb(), buf=print): buf("connecting to DSDB...") diff --git a/setup.cfg b/setup.cfg index e69de29..049c871 100755 --- a/setup.cfg +++ b/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length=99 \ No newline at end of file diff --git a/setup.py b/setup.py index 60e07dd..e116aad 100755 --- a/setup.py +++ b/setup.py @@ -6,39 +6,39 @@ here = path.abspath(path.dirname(__file__)) # Get the long description from the README file -with open(path.join(here, 'README.md'), encoding='utf-8') as f: +with open(path.join(here, "README.md"), encoding="utf-8") as f: long_description = f.read() -with open(path.join(here, 'LICENSE'), encoding='utf-8') as f: +with open(path.join(here, "LICENSE"), encoding="utf-8") as f: license_ = f.read() # get the dependencies and installs -with open(path.join(here, 'requirements.txt'), encoding='utf-8') as f: - all_reqs = f.read().split('\n') +with open(path.join(here, "requirements.txt"), encoding="utf-8") as f: + all_reqs = f.read().split("\n") -install_requires = [x.strip() for x in all_reqs if 'git+' not in x] +install_requires = [x.strip() for x in all_reqs if "git+" not in x] # dependency_links = [ # x.strip().replace('git+', '') for x in all_reqs if x.startswith('git+')] setup( name="dsdb", version=__version__, - description="Quick and 'real' database peristence for Data Scientists.", - long_description=long_description, - long_description_content_type='text/markdown', - url='https://www.buildnn.com', + description="Quick and real database peristence for Data Scientists.", + # long_description=long_description, + # long_description_content_type='text/markdown', + url="https://github.com/buildnn/dsdb", license=license_, classifiers=[ - 'Development Status :: 2 - Beta', - 'Intended Audience :: Developers', - 'Programming Language :: Python :: 3', + "Development Status :: 2 - Beta", + "Intended Audience :: Developers", + "Programming Language :: Python :: 3", ], packages=["dsdb"], - keywords='', + keywords="", # include_package_data=True, author="Giacomo Barone, Buildnn", install_requires=install_requires, # dependency_links=dependency_links, author_email="giacomo.barone@buildnn.com", +) -) \ No newline at end of file From 39bd901a48865ee6b780538efc775649dbfe7a44 Mon Sep 17 00:00:00 2001 From: Giacomo Barone Date: Wed, 26 Feb 2020 17:35:50 +0100 Subject: [PATCH 2/7] index on (no branch): 3549440 Merge pull request #3 from buildnn/v0.1.1 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 60e07dd..4fce5a4 100755 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from os import path from setuptools import setup -__version__ = "0.1.1" +__version__ = "0.1.0" here = path.abspath(path.dirname(__file__)) From 6687faf31e8f58efc7c72e6e4573281d3c13eab3 Mon Sep 17 00:00:00 2001 From: Giacomo Barone Date: Wed, 26 Feb 2020 17:35:41 +0100 Subject: [PATCH 3/7] index on (no branch): 3549440 Merge pull request #3 from buildnn/v0.1.1 --- README.md | 41 +++++++++++++++++++++++------------------ dsdb/_utils_dsdb.py | 12 +++++------- setup.cfg | 2 ++ setup.py | 28 ++++++++++++++-------------- 4 files changed, 44 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 578189f..d54a370 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # Welcome to `dsdb` -> Dsdb is a [Buildnn](https://www.buildnn.com) open source project. +Dsdb is a [Buildnn](https://www.buildnn.com) open source project. -Tired of having to manage thousands of unstructured .csv outputs for your small Data Science experiments? Would you like to experience a real SQL-like data management of yout datasets with a real database? +Tired of having to manage thousands of unstructured .csv outputs for your small Data Science experiments? Would you like to experience a real SQL-like data management of yout datasets with a real database? Take a look at what you can do with [Postgres](https://www.pgadmin.org/screenshots/#7). @@ -30,6 +30,7 @@ with DsDbConnect() as con: df.to_sql_table('table', con=con, if_exist='append') ``` + and... that's it. To load data from the db: ```python @@ -37,23 +38,23 @@ with DsDbConnect() as con: df_read = pd.read_sql_table('test', con) ``` - ## Quickstart using docker-compose The following workflow launches a dockerized `jupyter` server with an underlying db. -Firs, retrieve our pre-made `docker-compose.yml` file: +Firs, retrieve our pre-made `docker-compose.yml` file: + ```bash -$ cd my-project-dir -$ wget https://raw.githubusercontent.com/buildnn/dsdb/master/docker-compose.yml -$ wget https://raw.githubusercontent.com/buildnn/dsdb/master/notebooks/dsdb_test.ipynb -$ touch .env +cd my-project-dir +wget https://raw.githubusercontent.com/buildnn/dsdb/master/docker-compose.yml +wget https://raw.githubusercontent.com/buildnn/dsdb/master/notebooks/dsdb_test.ipynb +touch .env ``` Open the `.env` file and place the following text, filling the `{text under curly brackets}` as suggested: _content of the `.env` file -->_ -``` +```ini DSDB_USER=datascientist DSDB_PASSWORD={your password} DSDB_DB=dsdb @@ -65,36 +66,40 @@ POSTGRES_DB=mydb PGADMIN_DEFAULT_EMAIL={your email} PGADMIN_DEFAULT_PASSWORD={another different password} ``` + And then start the game -``` -$ docker-compose up + +```bash +docker-compose up ``` And... **that should be it**. Visit: + * `https://localhost:8888` to see jupyter * `https://localhost:5050` to visit the pgadmin panel (use the credentials in .env) - ## Pip Installation To pip-install this repo: + ```bash -$ pip install git+https://github.com/buildnn/dsdb.git +pip install dsdb ``` -## Connection to a custom DB server +## Connection to a custom DB server `dsdb.DsDbConnect` uses a `DsDb` object to connect to your db. It loads some **environment variables** and uses them to perform the connection. these are + * `DSDB_USER`: your username in the DB * `DSDB_PASSWORD`: your password to access the DB -* `DSDB_DB`: The name of the DB +* `DSDB_DB`: The name of the DB * `DSDB_HOST`: The address of the DB server -* `DSDB_DRIVER`: The driver. E.g. `'postgres+psycopg2'` for a standard postgres. +* `DSDB_DRIVER`: The driver. E.g. `'postgres+psycopg2'` for a standard postgres. The following is a quick way to create them directly inside yout python script: @@ -110,7 +115,7 @@ os.environ['DSDB_HOST'] = 'localhost:5432' # server address os.environ['DSDB_DRIVER'] = 'postgres+psycopg2' ... -``` +``` another option is to create a custom `dsdb.DsDb` object to pass to `dsdb.DsDbConnect`: @@ -128,4 +133,4 @@ db = dsdb.DsDb( with dsdb.DsDbConnect(db=db) as con: df.to_sql_table('table', con=con) ... -``` +``` diff --git a/dsdb/_utils_dsdb.py b/dsdb/_utils_dsdb.py index 71b51c3..4e14151 100755 --- a/dsdb/_utils_dsdb.py +++ b/dsdb/_utils_dsdb.py @@ -7,9 +7,11 @@ import attr from sqlalchemy import create_engine + def return_pwd(*args): return "pwd is hidden" + @attr.s class DsDb(object): usr = attr.ib(default=None) @@ -27,13 +29,8 @@ def create_engine(self): pwd = self.pwd if self.pwd else os.getenv("DSDB_PASSWORD") self.engine = create_engine( - '{}://{}:{}@{}/{}'.format( - driver, - usr, - pwd, - host, - db, - ), echo=False) + "{}://{}:{}@{}/{}".format(driver, usr, pwd, host, db,), echo=False + ) return self.engine def connect(self): @@ -47,6 +44,7 @@ def close(self): self.con.close() return self + @contextlib.contextmanager def DsDbConnect(db=DsDb(), buf=print): buf("connecting to DSDB...") diff --git a/setup.cfg b/setup.cfg index e69de29..049c871 100755 --- a/setup.cfg +++ b/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length=99 \ No newline at end of file diff --git a/setup.py b/setup.py index 4fce5a4..ac2e505 100755 --- a/setup.py +++ b/setup.py @@ -6,39 +6,39 @@ here = path.abspath(path.dirname(__file__)) # Get the long description from the README file -with open(path.join(here, 'README.md'), encoding='utf-8') as f: +with open(path.join(here, "README.md"), encoding="utf-8") as f: long_description = f.read() -with open(path.join(here, 'LICENSE'), encoding='utf-8') as f: +with open(path.join(here, "LICENSE"), encoding="utf-8") as f: license_ = f.read() # get the dependencies and installs -with open(path.join(here, 'requirements.txt'), encoding='utf-8') as f: - all_reqs = f.read().split('\n') +with open(path.join(here, "requirements.txt"), encoding="utf-8") as f: + all_reqs = f.read().split("\n") -install_requires = [x.strip() for x in all_reqs if 'git+' not in x] +install_requires = [x.strip() for x in all_reqs if "git+" not in x] # dependency_links = [ # x.strip().replace('git+', '') for x in all_reqs if x.startswith('git+')] setup( name="dsdb", version=__version__, - description="Quick and 'real' database peristence for Data Scientists.", - long_description=long_description, - long_description_content_type='text/markdown', - url='https://www.buildnn.com', + description="Quick and real database peristence for Data Scientists.", + # long_description=long_description, + # long_description_content_type='text/markdown', + url="https://github.com/buildnn/dsdb", license=license_, classifiers=[ - 'Development Status :: 2 - Beta', - 'Intended Audience :: Developers', - 'Programming Language :: Python :: 3', + "Development Status :: 2 - Beta", + "Intended Audience :: Developers", + "Programming Language :: Python :: 3", ], packages=["dsdb"], - keywords='', + keywords="", # include_package_data=True, author="Giacomo Barone, Buildnn", install_requires=install_requires, # dependency_links=dependency_links, author_email="giacomo.barone@buildnn.com", +) -) \ No newline at end of file From 70c764ea1191c29212705fbd71885792f574009a Mon Sep 17 00:00:00 2001 From: ggbaro Date: Fri, 28 Feb 2020 13:24:22 +0100 Subject: [PATCH 4/7] updated bugged version number --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ac2e505..e116aad 100755 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from os import path from setuptools import setup -__version__ = "0.1.0" +__version__ = "0.1.1" here = path.abspath(path.dirname(__file__)) From 23d675342c620045bf5231a50fc8bba078327656 Mon Sep 17 00:00:00 2001 From: ggbaro Date: Fri, 28 Feb 2020 14:06:28 +0100 Subject: [PATCH 5/7] makefile to remove help scripts --- Makefile | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++ build_wheel.sh | 2 -- 2 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 Makefile delete mode 100755 build_wheel.sh diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e4c469e --- /dev/null +++ b/Makefile @@ -0,0 +1,66 @@ +.PHONY: build_wheel + +## build package wheel +build_wheel: + python3 setup.py bdist_wheel --universal + +################################################################################# +# Self Documenting Commands # +################################################################################# + +.DEFAULT_GOAL := help + +# Inspired by +# sed script explained: +# /^##/: +# * save line in hold space +# * purge line +# * Loop: +# * append newline + line to hold space +# * go to next line +# * if line starts with doc comment, strip comment character off and loop +# * remove target prerequisites +# * append hold space (+ newline) to line +# * replace newline plus comments by `---` +# * print line +# Separate expressions are necessary because labels cannot be delimited by +# semicolon; see +.PHONY: help +help: + @echo "$$(tput bold)Available rules:$$(tput sgr0)" + @echo + @sed -n -e "/^## / { \ + h; \ + s/.*//; \ + :doc" \ + -e "H; \ + n; \ + s/^## //; \ + t doc" \ + -e "s/:.*//; \ + G; \ + s/\\n## /---/; \ + s/\\n/ /g; \ + p; \ + }" ${MAKEFILE_LIST} \ + | LC_ALL='C' sort --ignore-case \ + | awk -F '---' \ + -v ncol=$$(tput cols) \ + -v indent=19 \ + -v col_on="$$(tput setaf 6)" \ + -v col_off="$$(tput sgr0)" \ + '{ \ + printf "%s%*s%s ", col_on, -indent, $$1, col_off; \ + n = split($$2, words, " "); \ + line_length = ncol - indent; \ + for (i = 1; i <= n; i++) { \ + line_length -= length(words[i]) + 1; \ + if (line_length <= 0) { \ + line_length = ncol - indent - length(words[i]) - 1; \ + printf "\n%*s ", -indent, " "; \ + } \ + printf "%s ", words[i]; \ + } \ + printf "\n"; \ + }' \ + | more $(shell test $(shell uname) = Darwin && echo '--no-init --raw-control-chars') diff --git a/build_wheel.sh b/build_wheel.sh deleted file mode 100755 index ba00bcc..0000000 --- a/build_wheel.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -python3 setup.py bdist_wheel --universal \ No newline at end of file From 6c824146708bdbff68873058f375cfb6d1b5f54a Mon Sep 17 00:00:00 2001 From: ggbaro Date: Fri, 28 Feb 2020 14:07:01 +0100 Subject: [PATCH 6/7] added hide parameters functionality --- dsdb/_utils_dsdb.py | 9 +++++++-- setup.py | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/dsdb/_utils_dsdb.py b/dsdb/_utils_dsdb.py index 4e14151..9e03704 100755 --- a/dsdb/_utils_dsdb.py +++ b/dsdb/_utils_dsdb.py @@ -18,6 +18,7 @@ class DsDb(object): db = attr.ib(default=None) host = attr.ib(default=None) driver = attr.ib(default=None) + hide_parameters = attr.ib(default=True) pwd = attr.ib(default=None, repr=False) def create_engine(self): @@ -29,7 +30,9 @@ def create_engine(self): pwd = self.pwd if self.pwd else os.getenv("DSDB_PASSWORD") self.engine = create_engine( - "{}://{}:{}@{}/{}".format(driver, usr, pwd, host, db,), echo=False + "{}://{}:{}@{}/{}".format(driver, usr, pwd, host, db,), + echo=False, + hide_parameters=self.hide_parameters ) return self.engine @@ -46,7 +49,9 @@ def close(self): @contextlib.contextmanager -def DsDbConnect(db=DsDb(), buf=print): +def DsDbConnect(db=DsDb(), buf=print, hide_parameters=True): + if not db: + db = DsDb(hide_parameters=hide_parameters) buf("connecting to DSDB...") t0 = datetime.now() yield db.connect() diff --git a/setup.py b/setup.py index e116aad..b933ed3 100755 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from os import path from setuptools import setup -__version__ = "0.1.1" +__version__ = "0.1.2" here = path.abspath(path.dirname(__file__)) From 5d527a843b3cb23a88c09c7b5b861d3c1e71dff3 Mon Sep 17 00:00:00 2001 From: ggbaro Date: Fri, 28 Feb 2020 14:07:31 +0100 Subject: [PATCH 7/7] improved docker-compose --- docker-compose.yml | 10 +- notebooks/dsdb_test.ipynb | 206 +++++++++++++++++++------------------- 2 files changed, 110 insertions(+), 106 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 842301a..77c107a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,18 +4,21 @@ services: image: jupyter/scipy-notebook:latest container_name: jupyter-dsdb environment: + # Jupyter container variables JUPYTER_ENABLE_LAB: 1 + # DsDb variables DSDB_USER: ${DSDB_USER} DSDB_PASSWORD: ${DSDB_PASSWORD} DSDB_DB: ${DSDB_DB} DSDB_HOST: db:5432 DSDB_DRIVER: postgres+psycopg2 command: [ - "/bin/bash", "-c", "conda install --yes --quiet psycopg2 sqlalchemy && pip install -q git+https://bitbucket.org/buildnn/dsdb.git && start-notebook.sh --notebook-dir /local_directory --ip 0.0.0.0 --no-browser"] + "/bin/bash", "-c", "conda install --yes --quiet psycopg2 sqlalchemy && pip install -q dsdb && start-notebook.sh --notebook-dir ~/local_directory --ip 0.0.0.0 --no-browser"] ports: - 8888:8888 volumes: - - ./:/local_directory + - ./:/home/jovyan/local_directory + - jupyter_conda:/opt/conda depends_on: - db @@ -45,4 +48,5 @@ services: - db volumes: - postgres_data: \ No newline at end of file + postgres_data: + jupyter_conda: \ No newline at end of file diff --git a/notebooks/dsdb_test.ipynb b/notebooks/dsdb_test.ipynb index 54af43e..335e7e2 100644 --- a/notebooks/dsdb_test.ipynb +++ b/notebooks/dsdb_test.ipynb @@ -47,38 +47,38 @@ " \n", " \n", " 0\n", - " 198\n", - " 189\n", - " 115\n", - " 87\n", + " 148\n", + " 38\n", + " 45\n", + " 38\n", " \n", " \n", " 1\n", - " 165\n", - " 27\n", - " 220\n", - " 250\n", + " 199\n", + " 222\n", + " 105\n", + " 223\n", " \n", " \n", " 2\n", - " 67\n", - " 53\n", - " 61\n", - " 241\n", + " 47\n", + " 221\n", + " 244\n", + " 135\n", " \n", " \n", " 3\n", - " 26\n", - " 228\n", - " 119\n", - " 20\n", + " 127\n", + " 227\n", + " 22\n", + " 185\n", " \n", " \n", " 4\n", - " 75\n", - " 180\n", - " 123\n", - " 84\n", + " 108\n", + " 193\n", + " 159\n", + " 22\n", " \n", " \n", " ...\n", @@ -89,38 +89,38 @@ " \n", " \n", " 195\n", - " 161\n", - " 152\n", - " 225\n", - " 37\n", + " 140\n", + " 52\n", + " 57\n", + " 186\n", " \n", " \n", " 196\n", - " 155\n", - " 158\n", - " 75\n", - " 84\n", + " 104\n", + " 145\n", + " 250\n", + " 32\n", " \n", " \n", " 197\n", - " 194\n", " 13\n", - " 217\n", - " 86\n", + " 212\n", + " 244\n", + " 74\n", " \n", " \n", " 198\n", - " 54\n", - " 58\n", - " 156\n", - " 122\n", + " 119\n", + " 189\n", + " 202\n", + " 243\n", " \n", " \n", " 199\n", - " 69\n", - " 34\n", - " 158\n", - " 212\n", + " 121\n", + " 191\n", + " 99\n", + " 60\n", " \n", " \n", "\n", @@ -129,17 +129,17 @@ ], "text/plain": [ " a b c d\n", - "0 198 189 115 87\n", - "1 165 27 220 250\n", - "2 67 53 61 241\n", - "3 26 228 119 20\n", - "4 75 180 123 84\n", + "0 148 38 45 38\n", + "1 199 222 105 223\n", + "2 47 221 244 135\n", + "3 127 227 22 185\n", + "4 108 193 159 22\n", ".. ... ... ... ...\n", - "195 161 152 225 37\n", - "196 155 158 75 84\n", - "197 194 13 217 86\n", - "198 54 58 156 122\n", - "199 69 34 158 212\n", + "195 140 52 57 186\n", + "196 104 145 250 32\n", + "197 13 212 244 74\n", + "198 119 189 202 243\n", + "199 121 191 99 60\n", "\n", "[200 rows x 4 columns]" ] @@ -156,7 +156,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 3, "metadata": {}, "outputs": [ { @@ -164,7 +164,7 @@ "output_type": "stream", "text": [ "connecting to DSDB...\n", - "executed in 0:00:00.069802\n" + "executed in 0:00:00.078980\n" ] } ], @@ -175,7 +175,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 4, "metadata": {}, "outputs": [ { @@ -183,7 +183,7 @@ "output_type": "stream", "text": [ "connecting to DSDB...\n", - "executed in 0:00:00.033119\n" + "executed in 0:00:00.026652\n" ] }, { @@ -216,38 +216,38 @@ " \n", " \n", " 0\n", - " 198\n", - " 189\n", - " 115\n", - " 87\n", + " 148\n", + " 38\n", + " 45\n", + " 38\n", " \n", " \n", " 1\n", - " 165\n", - " 27\n", - " 220\n", - " 250\n", + " 199\n", + " 222\n", + " 105\n", + " 223\n", " \n", " \n", " 2\n", - " 67\n", - " 53\n", - " 61\n", - " 241\n", + " 47\n", + " 221\n", + " 244\n", + " 135\n", " \n", " \n", " 3\n", - " 26\n", - " 228\n", - " 119\n", - " 20\n", + " 127\n", + " 227\n", + " 22\n", + " 185\n", " \n", " \n", " 4\n", - " 75\n", - " 180\n", - " 123\n", - " 84\n", + " 108\n", + " 193\n", + " 159\n", + " 22\n", " \n", " \n", " ...\n", @@ -258,38 +258,38 @@ " \n", " \n", " 195\n", - " 161\n", - " 152\n", - " 225\n", - " 37\n", + " 140\n", + " 52\n", + " 57\n", + " 186\n", " \n", " \n", " 196\n", - " 155\n", - " 158\n", - " 75\n", - " 84\n", + " 104\n", + " 145\n", + " 250\n", + " 32\n", " \n", " \n", " 197\n", - " 194\n", " 13\n", - " 217\n", - " 86\n", + " 212\n", + " 244\n", + " 74\n", " \n", " \n", " 198\n", - " 54\n", - " 58\n", - " 156\n", - " 122\n", + " 119\n", + " 189\n", + " 202\n", + " 243\n", " \n", " \n", " 199\n", - " 69\n", - " 34\n", - " 158\n", - " 212\n", + " 121\n", + " 191\n", + " 99\n", + " 60\n", " \n", " \n", "\n", @@ -298,22 +298,22 @@ ], "text/plain": [ " a b c d\n", - "0 198 189 115 87\n", - "1 165 27 220 250\n", - "2 67 53 61 241\n", - "3 26 228 119 20\n", - "4 75 180 123 84\n", + "0 148 38 45 38\n", + "1 199 222 105 223\n", + "2 47 221 244 135\n", + "3 127 227 22 185\n", + "4 108 193 159 22\n", ".. ... ... ... ...\n", - "195 161 152 225 37\n", - "196 155 158 75 84\n", - "197 194 13 217 86\n", - "198 54 58 156 122\n", - "199 69 34 158 212\n", + "195 140 52 57 186\n", + "196 104 145 250 32\n", + "197 13 212 244 74\n", + "198 119 189 202 243\n", + "199 121 191 99 60\n", "\n", "[200 rows x 4 columns]" ] }, - "execution_count": 5, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" }