![]() This isn't utterly important though, and I'm just trying to learn using python, and the actual work has been done in excel. You need to pass a string for the label text to the function. I have come across a few other posts related to this issue, but not seen one that specifically addresses the renaming of individual labels. You can customize the title of your matplotlib chart with the xlabel() and ylabel() functions. This is the error I get when using the above code.ĪttributeError: 'Series' object has no attribute 'set_ylabel' I have tried to rename the x-axis labels using the code below. Pd.set_option('display.mpl_style', 'default')įixed_data = pd.read_csv('audit-rep.csv',sep=',',encoding='latin1',index_col='Index', parse_dates=,dayfirst=False) This is the code I have used, and except for the label names, I am happy with the result. Instead of having these verbose reasons though, I would like to rename the X-Axis labels to just numbers or alphabets so that the graph reads somewhat like this: Vendor Registration not on record.another 300 words - 9.No contract with vendor.another 300 words - 14.Not approved by regional committee.another 300 words - 17.The problem I am facing is renaming the X-Axis labels.Įssentially, the chart is trying to plot a count of different types of Audit Violations, but has really long descriptions of the said violations. I have a CSV file that I am trying to read using Python, and looking to come up with charts. ![]() ![]() I'm running my code on iPython Notebooks, on a Macbook Pro Yosemite 10.10.4 ![]()
0 Comments
Leave a Reply. |