Python Forum
Python Custom Module not working in Jupyter Notebook with Pandas
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Custom Module not working in Jupyter Notebook with Pandas
#1
Hi Guys,


I have made a custom code in Python that i was to apply to a spreadsheet with Jupyter Notebook.

I get the following error code and do not understand how to fix it.


E:\OneDrive\Coding\Python\004 - Tax 3\Cont Tax\a_calc_marginals.py in calculate(self)
42 percentage = percentage_list
43
---> 44 bracket.append(int(self.value))
45
46 bracket = [num for num in bracket if num <= self.value]

E:\Anaconda3\lib\site-packages\pandas\core\series.py in wrapper(self)
110 if len(self) == 1:
111 return converter(self.iloc[0])
--> 112 raise TypeError(f"cannot convert the series to {converter}")
113
114 wrapper.__name__ = f"__{converter.__name__}__"

TypeError: cannot convert the series to <class 'int'


Could someoe please take a look?

I have shared on Google Drive in the following location.

https://drive.google.com/file/d/1vAnNtLa...sp=sharing

Thanks in advance.

Fid
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Setting up and integrating Jupyter Notebook development environment with VSC Drone4four 3 280 Sep-12-2022, 09:18 AM
Last Post: Drone4four
Thumbs Up can't access data from URL in pandas/jupyter notebook aaanoushka 1 797 Feb-13-2022, 01:19 PM
Last Post: jefsummers
Exclamation Jupyter Notebook - Help Needed! eyadfr 1 847 Jan-26-2022, 06:42 PM
Last Post: jefsummers
  Help needed with Jupyter Notebook eyadfr 4 903 Jan-04-2022, 08:20 PM
Last Post: snippsat
  Pandas replace function not working on datafram with floats bcrypto 1 1,658 Apr-12-2021, 08:59 PM
Last Post: bcrypto
  HELP! Importing json file into csv into jupyter notebook vilsef 2 1,452 Jan-22-2021, 11:06 AM
Last Post: snippsat
  How can draw a real-time marker on map using folium/leaflet Jupyter notebook C3PO 0 1,634 Dec-22-2020, 07:04 PM
Last Post: C3PO
  Unable to install dataprep on my python notebook simplexity 0 2,218 Oct-11-2020, 01:59 AM
Last Post: simplexity
  AttributeError: (“module 'pandas' has no attribute 'rolling_std'” Mariana136 4 6,028 Sep-23-2019, 12:56 PM
Last Post: Mariana136
  How to change working directory in Jupyter Notebook? rajeev1729 2 19,777 Aug-25-2019, 07:25 PM
Last Post: perfringo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020