0
$\begingroup$

I have a txt file (here) and i have tried to plot it with pandas, xarray of python

I tried with

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt

df = pd.read_csv("name.txt",
                 delim_whitespace=True,
                 usecols=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
                 names=["no.", "January ", "February ", "March", "April ", "May", "June", "July", "August", "September", "October", "November", "December"])
df.head()
df.info()
df.shape
print(len(df));
print(len(df.columns))

df_full = df.replace(-99.000000,np.NaN)
df_full.describe()

Then, I would like to plot a time-series with x is time (daily, monthly or yearly) and y-axis is value. Do you have any suggestions?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.