Category : jupyter-notebook

I am using python 3.6. I installed Jupyterlab using pip command in my virtual environment but when I type "Jupyter Notebook" to open it, I get the error: **def _failing_new(*args: t.Any, kwargs: t.Any) -> t.NoReturn: AttributeError: module ‘typing’ has no attribute ‘NoReturn’ —- Currently installed libraries in my virtual environment are : —- argon2-cffi==20.1.0 async-generator==1.10 ..

Read more

I want to grab the data between column df[‘Instrument’]’s ‘Closed Qty’ and ‘Symbol’. Please refer to the pic. ‘Closed Qty’ and ‘Symbol’ both are values of column df[‘Instrument’]. So, I want to grab all those values in between the row ‘Closed Qty’ and ‘Symbol’ and including the row ‘Closed Qty’ and ‘Symbol’. Source: Python-3x..

Read more

so, i’ve been getting this same error even though the array i’m trying to pass through knn.fit is definitely not a dictionary and haven’t been able to understand what the error means. been stuck on this for three days, this is my last hope or else i’m going to get fired. d1 = d1[:, 0] ..

Read more

I am running Python2 on a Jupyter Notebook. When I try to do: import emcee I get the error: File "/home/me/.local/lib/python2.7/site-packages/emcee/ensemble.py", line 84 parameter_names: Optional[Union[Dict[str, int], List[str]]] = None, ^ SyntaxError: invalid syntax Is this because I am using Python2 and should be running Python3? If I do python -V and python3 -V in my ..

Read more

I am trying to automate a code found here https://xlsxwriter.readthedocs.io/example_pandas_table.html But when I try it, it returns an empty file, with the proper filename def as_table(xlsx_name, sheet_1_name, df_name): #string, string, dataframe variable writer = pd.ExcelWriter("output/{}.xlsx".format(xlsx_name), engine =’xlsxwriter’) df_name.to_excel(writer, sheet_name = "{}".format(sheet_1_name), startrow=1, header=False, index=False) workbook = writer.book worksheet = writer.sheets["{}".format(sheet_1_name)] (max_row, max_col) = df_name.shape column_settings ..

Read more