posted 4 years ago
Hi Travis,
I have been searching on the web there is so many example, but i am still confused because i am a beginner. I have tried my script below :
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.colors as colors
import csv
import glob
import os
path = "C:/Users/SYIFAAZRA/Documents/belajar_wradlib/Skew-T/New/"
os.chdir(path)
filenames = glob.glob("*.csv")
dfs = []
for f in filenames:
col_names = ['height', 'temp']
df = pd.read_csv(f, delimiter=',',skiprows=7, usecols=[11, 21], names=col_names, na_values=['----'])
df = df.dropna()
max = df.height.idxmax()
min = df.height.idxmin()
df = df.loc[min:max, :]
dfs.append(df)
df2 = pd.concat(dfs, ignore_index=False, axis=1)
fig = plt.figure()
ax = fig.add_subplot(111)
x = np.linspace(0,100, 50)
y = df['height']
X,Y = np.meshgrid(x, y)
Z = df['temp']
plt.show()
A contour has not showed. I don't know in where part i have wrong because nothing error warning from my script above. Perhaps you can help me travis.