| Operation | Pandas | Spark | Optimus |
|---|---|---|---|
| Create Dataframe | pd.Dataframe | spark.createdataframe() | op.create.df() |
| Append Column | df.join(), pd.concat() | df.withColumn() | df.cols.append() |
| Append Row | df.append() | df.union() | df.rows().append() |
| Filter Column | df.filter(axis=1) | df.select() | df.cols.select() |
| Filter Row | df.filter() | df.filter() | df.rows.select() |
| Apply | df.apply() | fn = F.udf(labmbda x:x+1, DoubleType()) df.withColumn('disp1', fn(df.disp)) | df.cols.apply() |
| Drop Column | df.drop(axis=1) | df.drop() | df.cols.drop() |
| Drop Row | df.drop() | df.filter() | df.rows.drop() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var orm = require('bigchaindb-orm'); | |
| const driver = require('bigchaindb-driver') | |
| const bip39 = require('bip39') | |
| var express = require('express'); | |
| var router = express.Router(); | |
| /* GET home page. */ | |
| router.get('/', function(req, res, next) { | |
| res.render('index', { title: 'Express'}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var express = require('express'); | |
| var router = express.Router(); | |
| const series = require('async/series') | |
| const IPFS = require('ipfs') | |
| module.exports = router; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Foot switch driver http://software.pcsensor.com/pc_en.html | |
| # Key mapper https://autohotkey.com/ | |
| # Now create a new script | |
| 1.Right-Click on your desktop. | |
| 2.Find "New" in the menu. | |
| 3.Click "AutoHotkey Script" inside the "New" menu. | |
| 4.Give the script a new name. It must end with a .ahk extension. For example: MyScript.ahk | |
| 5.Find the newly created file on your desktop and right-click it. |
| Description | Pandas | Spark | Optimus |
|---|---|---|---|
| Read csv file | pd.read_csv() | spark.read.csv() | op.read.csv() |
| Create Dataframe | pd.Dataframe | df.createdataframe() | op.create.df() |
| Append Row | df.append | df.union() | df.row().append() |
| Column Mean | df.mean | df1.agg({"x": "max"}) | df.cols().mean() |
| Show Rows from Dataframe | df.head() | df.show() | df.show() |
| Drop Columns | df.drop() | df.drop() | df.cols().drop() |
| Sum all values in a Column | df.sum() | df1.agg({"x": "sum"}) function | df.cols().sum() |
| Save Dataframe to csv | df.to_csv() | df.write.csv() | df.save().csv() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "columns": { | |
| "escuelas_cercanas": { | |
| "column_type": "bool", | |
| "dtypes_stats": { | |
| "bool": 21, | |
| "date": 0, | |
| "float": 0, | |
| "int": 0, | |
| "missing": 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "columns": { | |
| "GeoLocation": { | |
| "column_type": "categorical", | |
| "frequency": [ | |
| { | |
| "count": 1, | |
| "percentage": 0.00219, | |
| "value": "(-31.416670, -60.666670)" | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| df = op.create.df( | |
| [ | |
| ("names", "str", True), | |
| ("height", "float", True), | |
| ("function", "str", True), | |
| ("rank", "int", True), | |
| ], | |
| [ | |
| ("bumbl#ebéé ", 17.5, "Espionage", 7), | |
| ("Optim'us", 28.0, "Leader", 10), |
OlderNewer