import seaborn as sns anscombe = sns.load_dataset("anscombe") print(anscombe) TypeError: unsupported operand type(s) for -: ‘datetime.datetime’ and ‘str’ Já instalei a biblioteca seaborn e aparece esse erro no Pycharm quem puder ajudar obrigado. Source: Python..
I have a df that looks like this: time val 0 1 1 1 2 2 3 3 4 1 5 2 How do I create new columns that hold the cumulative sum of occurance of a condition? In this case, I want to create a column for each unique value in val that holds ..
I wrote a python script to kick off build jobs for all of our microservices. I am doing some testing and want to ensure I handle a job that occurs an error and fails somewhere in the deploy.jenkins file. I basically just created another pipeline job for this deployment build script, call it manually from ..
I’m trying to scrap the following website: https://www.ishares.com/us/products/239726/ishares-core-sp-500-etf In particular, I’m trying to get all the information from ‘Key Facts’ and ‘Portfolio Characteristics’ etc. However when I run my code, it only returns the first item from each one even though there are 8-10 in each. I feel like the loop finishes once it finds ..
I am doing a feature selection for a linear regression model. I have the training data and the test data in seperate dataframes. The training data frame ends at the end of january and the test data frame at the end of february. The goal is to select a promising set of features to train ..
I am unable to get the required result from the Sci-kit learn categorical Imputer. df_cat = df[["Suburb", "Address", "Type", "Method", "SellerG", "Date", "YearBuilt", "CouncilArea", "Regionname"]] df_cat[‘Suburb’] = pd.to_numeric(df_cat[‘Suburb’], errors=’coerce’) df_cat[‘Address’] = pd.to_numeric(df_cat[‘Address’], errors=’coerce’) df_cat[‘Type’] = pd.to_numeric(df_cat[‘Type’], errors=’coerce’) df_cat[‘Method’] = pd.to_numeric(df_cat[‘Method’], errors=’coerce’) df_cat[‘SellerG’] = pd.to_numeric(df_cat[‘SellerG’], errors=’coerce’) df_cat[‘YearBuilt’] = pd.to_numeric(df_cat[‘YearBuilt’], errors=’coerce’) df_cat[‘CouncilArea’] = pd.to_numeric(df_cat[‘CouncilArea’], errors=’coerce’) df_cat[‘Regionname’] = ..
Imm trying to get an output like array([0,1,2,3,4,5]), but this error keeps popping up. When reading the python documentation for the numpy concatenate method, it claims axis=None will flatten the arrays first, so what am I not understanding? >>> a = np.array([1,2,3,4,5]) >>> b = np.array() >>> b array() >>> a array([1, 2, 3, 4, ..
I am attempting to migrate my changes with command python manage.py migrate I have already ran the command, python manage.py makemigrations accounts which successfully returns, Migrations for ‘accounts’: accounts/migrations/0001_initial.py – Create model CustomUser Then in attempting to run python manage.py migrate I recieve this error… Traceback (most recent call last): File "/home/mycroft/C/news/manage.py", line 22, in ..
I’m making a trading strategy that uses support and resistance levels. One of the ways i’m finding those is by searching for maxima’s/minima’s (prices that are higher/lower than the previous and next 5 prices). I have an array of smoothed closing prices and i first tried to find them with a for loop : def ..
I want to start teaching myself how to visualize and analyze data in python, for example coding and plotting models (I study Molecular Biology). For this, I’m looking for a good programm to write the codes. I want something that doesn’t use much storage on the laptop, so I don’t want to install anaconda. Someone ..