- Ubuntu 24.04 LTS
- Python 3.10.14
git submodule update --init
pip install -r requirements.txtThe notebooks in this Gist compare the following operations and demonstrate their equivalent outputs:
For pandas 1.3.0:
input_data.groupby(group_by_column).mean()[[expression_column]]| library(igraph) # to work with graphs | |
| library(RColorBrewer) # to use a color palette | |
| library(plotrix) # to rescale variables | |
| # Read the data | |
| raw_data <- read.csv("network_data.csv") | |
| names(raw_data) <- c("Source", "Target", "Count", "Money") | |
| # reformat data for igraph library |
| import os | |
| import sys | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| from pandas import DataFrame | |
| from pandas.util.testing import set_trace | |
| dirs = [] |
| from sklearn.metrics import confusion_matrix | |
| def print_cm(cm, labels, hide_zeroes=False, hide_diagonal=False, hide_threshold=None): | |
| """pretty print for confusion matrixes""" | |
| columnwidth = max([len(x) for x in labels]+[5]) # 5 is value length | |
| empty_cell = " " * columnwidth | |
| # Print header | |
| print " " + empty_cell, | |
| for label in labels: | |
| print "%{0}s".format(columnwidth) % label, |
| { | |
| "metadata": { | |
| "name": "exploring_a_single_data_file" | |
| }, | |
| "nbformat": 3, | |
| "nbformat_minor": 0, | |
| "worksheets": [ | |
| { | |
| "cells": [ | |
| { |