Skip to content
Snippets Groups Projects
Commit f5eb5ce5 authored by CherylYang97's avatar CherylYang97
Browse files

Final

parent 4ab29e16
No related branches found
No related tags found
No related merge requests found
Pipeline #185249 failed
......@@ -1033,7 +1033,7 @@
"source": [
"# Aggregate NOSQL database to found ten best teammates of a player.\n",
"def ten_best_teammates(PlayerName):\n",
# This line is deleted for password
" client = MongoClient(\"mongodb+srv://Dennis_97:6SJ8terIm8Tq5p0l@cluster0-a55xg.mongodb.net/test?retryWrites=true&w=majority\")\n",
" db = client.get_database('NBAMongo_db')\n",
" records = db.Team_Roaster\n",
" a = records.aggregate([{'$unwind':\"$Players\"},{'$match':{'Players': PlayerName}},{'$project':{'_id':0, 'name': 1, 'Season': 1}},{'$sort':{'Season': 1}}])\n",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment