I have been searching for hours, literally the entire day on how to generate a pivot table in Python. I am very new to python so please bear with me.
What I want is to take a csv file, extract the first column and generate a pivot table using the count or frequency of the numbers in that column, and sort descending
import pandas
import numpy
from numpy import recfromtxt
a = recfromtxt('1.csv', skiprows=1, usecols=0, delimiter=',')
print a
^ what i get here is a list of the first column [2 2 2 6 7]
What i need is an export of 2 columns
2--3
6--1
7--1