0
I developed a code to help me analyze data faster than I’ve been doing before. All the development was adapted to Jupyter Notebook used in Google Chrome, this because the company I work does not allow me to install any terminal on my notebook unfortunately.
The description of my code is as follows::
Import database from github
import pandas as pd
import numpy as np
database_goodshipped = pd.read_csv("https://raw.githubusercontent.com/CaiqueBarrreto/agroci/main/column2.csv")
Data processing by np.Where
database_goodshipped['variavel_resposta'] = np.where(database_goodshipped['Goods Shipped'].str.contains('FLUTRIAFOL'), 'FLUTRIAFOL',
(np.where(database_goodshipped['Goods Shipped'].str.contains('CARBENDAZIM'), 'CARBENDAZIM', 'NID')))
Attempt to turn my treated base into a . csv file
b = np.savetxt('myfile.csv', database_goodshipped, delimiter = ",", fmt = '%s')
a = open('myfile.csv', 'r')
print(a.read())
In this case, the error that is returned to me is the following:
As I described, the intention is to download my base in csv after treating it with numpy; in this case, I did not understand if this error is because the Jupyter Notebook in the browser version does not allow me to do this type of command or if my code is wrong. In fact, I’ve never heard of Donwloads made by this type of terminal, but it doesn’t hurt to try, right?! hahaha
Thank you
Goes in the file
jupyter_notebook_config.py
and configure the inputNotebookApp.iopub_data_rate_limit
or start the notebook with the parameter setjupyter --NotebookApp.iopub_data_rate_limit=<coloque_aqui_o_valor_desejado>
– Augusto Vasques
Augusto, thank you for the information. But how to do this in practice?
– Caique Barreto
On the command line type
jupyter notebook --NotebookApp.iopub_data_rate_limit=1000000000
or other value– Augusto Vasques
Augusto, I tried to do according to but only the "invalid syntax". Any memory adjustment I try to do is giving this, actually. Will the browser this is allowed?
– Caique Barreto
is in the google colab?
– Augusto Vasques
actually was by Jupyter Lab. I tried to do by google colab as you suggested but also gives the same error
– Caique Barreto
@Augustovasques, I have no great need to print the final file, just really wanted to follow up with the download. Have any suggestions, in case?
– Caique Barreto
Is that I spoke to you either by the command line (DOS, Powershell, Bash, ZSH... or any shell that uses) Initializing the notebook with
jupyter notebook --NotebookApp.iopub_data_rate_limit=1000000000
or go to the folder where Jupyter Notebook is installed and edit the file jupyter_notebook_config.py and on the line where you have writtenNotebookApp.iopub_data_rate_limit=1000000
increase the valueNotebookApp.iopub_data_rate_limit=1000000000
. If your notebook still doesn’t have the configuration file type in the command linejupyter notebook --generate-config
– Augusto Vasques
Thank you very much!!! It worked here!
– Caique Barreto