Posts

Showing posts with the label jupyter-notebook

How to add the mongoDB driver and connector to the jupyter notebook?

How to add the mongoDB driver and connector to the jupyter notebook? I would like to add the MongoDB Spark Connector v2.2 to the Jupyter notebook to pull data as dataframes from a mongodb database. However I keep on getting that error, I am not sure how to proceed from here. MongoDB Spark Connector v2.2 An error occurred while calling o40.load. : java.lang.NoClassDefFoundError: com/mongodb/ConnectionString The Spark version I am using is 2.3.1 2.3.1 The Python version I am using is 3.6.5 |Anaconda, Inc.| 3.6.5 |Anaconda, Inc.| I am running the Jupyter notebook on Windows 10 Windows 10 I downloaded the .jar files from the following link, specifically Version: 2.2.3-s_2.11 2.2.3-s_2.11 How to add the mongoDB driver and connector to the jupyter notebook ? I am not quite sure how to point the jupyter notebook to the correct location in windows 10 The code is as follows import findspark findspark.init() import os %env os.environ['PYSPARK_SUBMIT_ARGS'] = '--packages org.mongod...

Creating an ipynb from URL

Creating an ipynb from URL really simple question. I have a URL here that I'm trying to open in Jupyter lab as a jupyter notebook. What is the easiest way to do this? Is there a command line command somewhere? Thanks. 1 Answer 1 Just download that file to a working directory - with a menu 'save link as...' or visiting the URL and doing save. Start juypter notebook from shell (commandline). juypter notebook In the directory window that it opens for you, double click the saved style.ipynb . Now you have the notebook running in a new window. style.ipynb By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

jupyter kernel failing with following error: 'module' object has no attribute 'partial'

jupyter kernel failing with following error: 'module' object has no attribute 'partial' I am having trouble running a kernel in jupyter notebook $ conda info active environment : None user config file : /home/jazzy/.condarc populated config files : conda version : 4.5.4 conda-build version : not installed python version : 2.7.15.final.0 base environment : /data/jazzy/miniconda2 (writable) channel URLs : https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/free/linux-64 https://repo.anaconda.com/pkgs/free/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch https://repo.anaconda.com/pkgs/pro/linux-64 https://repo.anaconda.com/pkgs/pro/noa...

Fuzzy matching using Python Pandas

Fuzzy matching using Python Pandas I have two set of data: A is the source data contain columns [company_name], [company_id] B is test data contains only column [company_name] I want to apply some fuzzy match function (soundex, levenshtein_distance etc.) to compare each [company_name] in B against all [company_name] in A, the aggregate the score to find out which company names in B has a match in A and output their correct ID from A. Because the size of A and B data-frame are quite large, I cannot full join A and B. Can anyone help me howto write a loop (or if there is any other way) to achieve my goals here? By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.