Questions tagged as 'jupyter'

1
answer

Can you draw rectangles of Riemann sums with Python 3?

I already drew the graph of the equation x ** 2 with Jupyter with the code: from sympy.plotting import plot from sympy.abc import x eq=x**2 plot(eq,(x,-2,2),ylim=(-1,2),line_color="g") that gives us the image: but it is also necess...
asked by 16.10.2016 / 08:07
1
answer

Empty graphic in Jupyter

I am replicating this code to plot a line and a point but when I try to visualize the graphic it is empty. %matplotlib inline from matplotlib import pyplot from shapely.geometry import LineString, Point, LinearRing # Datos de entrada Line =...
asked by 20.03.2018 / 15:38
1
answer

Center graph Pertersen in jupyter

I would like to know how I can make the graph go straight and not tilted as it is. I'm doing it with the IDE Jupyter and Python 3.6. This is the code: import networkx gP = { 1: [2,5,6], 2: [3,1,7], 3: [4,2,8], 4: [5,3,9], 5: [1,4,10],6: [1...
asked by 07.06.2018 / 15:27
2
answers

Formatting pyramid panda dataframe

I have a set of business tax identification data. from io import StringIO import pandas as pd csv =StringIO(u'''\ NIT, TYPE 8600219985, company 9001899451, company 19479647, person 19065171, company 79896134, person 87111760819, person ''')...
asked by 10.05.2018 / 21:46
1
answer

Problems opening Jupyter Notebook - Python

I just reinstalled python and the package for jupyter notebook, however when running from the cmd jupyter notebook I get the following message I verify the installation and it tells me that it has all the required packages installed Do...
asked by 20.08.2017 / 02:29
1
answer

Error in Jupyter with SPARK (Pyhton)

Python , Spark , Jupyter in my notebook and I see a failure when I try to run the following code, I put this example (text analysis), but it jumps in many other programs, I tried everything, configure the clusters, review the...
asked by 18.12.2018 / 12:23
1
answer

TypeError: 'int' object has no attribute '__getitem__'

I have a data frame with different identification numbers and I am trying to format it in two sections, if it has more than 10 digits the format is: 123.456.789-0, if it is different to 10 digits (less or more) the format is : 123,456,789 / 123,...
asked by 20.10.2018 / 01:25
1
answer

type 'exceptions.ValueError': invalid literal for int () with base 10: '19065171.'

I have the following code: for i in range(0, len(terceros_df.NIT)): print 'esto es i =', i number = terceros_df.iloc[i]['NIT'] length = len(str(number)) if length == 10: str_number = str(number) nit = str_number...
asked by 22.10.2018 / 17:30
0
answers

What is the reason for this error: too many values to unpack (expected 4)?

2 print(distancia_trayecto(puntos)) ----> 3 print(distancia_trayecto(primera_parte)) 4 print(distancia_trayecto(segunda_parte)) ---> 14 lista_de_coordenadas = [(latitud, longitud, altitud) for _, latitud, longitud, altitud in...
asked by 04.11.2018 / 17:48
3
answers

how to iterate in a dataframe with loop for

I have a list I'm trying to iterate with a for loop in a dataframe to query a data in a webservice: value=[] for i in range(0, 10): nit = mydataset_df.CO_tin_no url = 'http://www.rues.org.co/RM/ConsultaNIT_json' headers,...
asked by 16.10.2018 / 23:44