Skip to content

Instantly share code, notes, and snippets.

View wesm's full-sized avatar
💭
➡️ ➡️ ➡️

Wes McKinney wesm

💭
➡️ ➡️ ➡️
View GitHub Profile
@wesm
wesm / gist:3904598
Created October 17, 2012 09:04
Foo2
{
"metadata": {
"name": "NYCPython_FoodDB"
},
"nbformat": 3,
"worksheets": [
{
"cells": [
{
"cell_type": "code",
@wesm
wesm / gist:3904875
Created October 17, 2012 10:31
DataScienceWorkshop
This file has been truncated, but you can view the full file.
{
"metadata": {
"name": "DataScienceTutorial"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@wesm
wesm / Movielens.ipynb
Created October 24, 2012 16:04
Data Science London 10/18/2012
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wesm
wesm / gist:4159315
Created November 28, 2012 06:03
pandas e28903c vbench vs 0.9.0
*** Processing results...
***
Results:
t_head t_baseline ratio
name
read_csv_comment2 28.6790 366.0152 0.0784
frame_iteritems_cached 0.0677 0.3855 0.1757
read_csv_thou_vb 35.5317 188.2858 0.1887
append_frame_single_homogenous 0.3423 0.8898 0.3847
@wesm
wesm / repr_test.ipynb
Created December 7, 2012 23:25
Wide DataFrame repr
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wesm
wesm / gist:4260416
Created December 11, 2012 17:20
Parsing escapes
In [15]: paste
data = '''SEARCH_TERM,ACTUAL_URL
"bra tv bord","http://www.ikea.com/se/sv/catalog/categories/departments/living_room/10475/?se%7cps%7cnonbranded%7cvardagsrum%7cgoogle%7ctv_bord"
"tv p\xc3\xa5 hjul","http://www.ikea.com/se/sv/catalog/categories/departments/living_room/10475/?se%7cps%7cnonbranded%7cvardagsrum%7cgoogle%7ctv_bord"
"SLAGBORD, \\"Bergslagen\\", IKEA:s 1700-tals serie","http://www.ikea.com/se/sv/catalog/categories/departments/living_room/10475/?se%7cps%7cnonbranded%7cvardagsrum%7cgoogle%7ctv_bord"'''
df = read_csv(StringIO(data), escapechar='\\', encoding='utf-8')
## -- End pasted text --
@wesm
wesm / gist:4328868
Created December 18, 2012 15:17
Long reshaping example from PyData mailing ilst
{
"metadata": {
"name": "LongReshape"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
{
"metadata": {
"name": "Untitled1"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@wesm
wesm / gist:5041883
Created February 26, 2013 20:31
Foo
{
"metadata": {
"name": "NYCPython_FoodDB"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@wesm
wesm / gist:5207157
Created March 20, 2013 18:24
PyData-20130320
{
"metadata": {
"name": "PyDataTalk"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{