Omitting missing or Nan columns in python plot
I am plotting a pandas data frame with 4 columns. Either one or two of the four columns may have Nan or the entire column may be missing. In my code below, I get the error TypeError: unhashable type: 'Series' import pandas as pd import matplotlib.pyplot as plt import numpy as np import datetime fig, ax = plt.subplots(figsize=(10, 10)) data = {'x': [1, 2, 3,4, 5, 6], 'y': [4, 5, 6, 7, 8, 9],'a': [1, 3, 2, 3, 2, 1], 'b': [0, 0, 0, 0, 0, 0]} df = pd.DataFrame(data) #Convert day numbers to dates #**************************** days = {} for i in range(0, 6): days[i] = (datetime.datetime(1999, 10, 1)
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.