Skip to content

Instantly share code, notes, and snippets.

@Pabla007
Created March 5, 2019 22:59
Show Gist options
  • Save Pabla007/fbf91c0f220aea81aae8d663d4ceb0b7 to your computer and use it in GitHub Desktop.
Save Pabla007/fbf91c0f220aea81aae8d663d4ceb0b7 to your computer and use it in GitHub Desktop.
A simple Module that takes Csv and plot it with column 0 vs column 1 by default
#Python Module Filebox
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
def load_file(filename):
df=pd.read_csv(filename)
df.plot(x=df.columns[0],y=df.columns[1])
plt.show()
#df = pd.read_csv('C:\Users\pabla\Downloads\C2ImportCalEventSample.csv')
#print df
#Take the input from user
#file1 = 'C:\Users\pabla\OneDrive\Desktop\Plot\Sample.csv'
#print(file1)
#print type(file1)
#load_file('C:\\Users\\pabla\\OneDrive\\Desktop\\Plot\\Sample.csv')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment