in - Data Science

How to use MongoDb with Python

This little tutorial shows how to use MongoDB with python. from pymongo import MongoClient import pprint import pandas as pd #Connect to mongodb client = MongoClient('mongodb://localhost:27017/', readPreference='primaryPreferred') #Connect to spark db db = client['Connect_to_Spark_db'] mentions_events = db['mentions_events'] pprint.pprint(mentions_events.find_one()) Test request...

in - Data Science

How to transfer a Python graph to a Neo4j graph

Data concerning publications found on the data.world website Data concerning the Olympic winter sport competitions found in the data.world website Music data found in kaggle website The objective here is to generate the csv files which will represent the corpus...

in - Data Science

How to transfer a Neo4j graph to a Python graph

Neo4j contains libraries such as GDS and APOC which allow the use of already existing advanced methods and algorithms. But if that’s not enough, in this jupyter notebook, I want to show that we can get the results of Cypher...

in - Machine Learning

How to do node classification and choose important features

import networkx as nx import numpy as np import pandas as pd import os import stellargraph as sg from stellargraph.mapper import GraphSAGENodeGenerator from stellargraph.layer import GraphSAGE from tensorflow.keras import layers, optimizers, losses, metrics, Model from sklearn import model_selection from sklearn.utils...