how to specify data on pearson correlation heatmap?

I have a pearson correlation heat map coded, but its showing data from my dataframe which i dont need. is there a way to specify which columns i’d like to include? thanks in advance sb.heatmap(df[‘POPDEN’, ‘RoadsArea’, ‘MedianIncome’, ‘MedianPrice’, ‘PropertyCount’, ‘AvPTAI2015’, ‘PTAL’].corr(), annot=True, fmt=’.2f’) ————————————————————————— TypeError Traceback (most recent call last) <ipython-input-54-832fc3c86e3e> in <module> —-> 1… Read More how to specify data on pearson correlation heatmap?

TypeError: 'float' object is not subscriptable–

I want to calculate the average value of every three lines of data in the text. The error is as follows: Traceback (most recent call last): File "/home/code/test1.py", line 7, in <module> lines = sum(lines[i:i+3])/3 TypeError: ‘float’ object is not subscriptable with open(‘/home/data/NB_accuracy_score.txt’, ‘r’) as f: lines = f.readlines() lines = [line.strip().split(‘\t’) for line in… Read More TypeError: 'float' object is not subscriptable–

Why do I keep getting the error "File "TypeError: 'int' object is not callable"?

Hope someone can help explain why I keep getting the following error in Python. Python version: Python 3.10.4 OS: Windows 11 in a vm Steps to reproduce the error in REPL or JuyterLab. def minmax(items): return min(items), max(items) lst = [98, 34, 78, 1, 0, -10, -19, -1] (min, max) = minmax(lst) # **no error**… Read More Why do I keep getting the error "File "TypeError: 'int' object is not callable"?

Receiving an exception and code failing when trying to delete a line from a .txt file using java

I am trying to delete a specific line from my text file using java, My code is supposed to write the file to a temp file and skip writing the username (chosen to be deleted), it is then supposed to delete the original file and rename the new temp file to match the original. The… Read More Receiving an exception and code failing when trying to delete a line from a .txt file using java