Category : python

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 ..

Read more

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’] = ..

Read more

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([0]) >>> b array([0]) >>> a array([1, 2, 3, 4, ..

Read more

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 ..

Read more

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 ..

Read more