Python Forum
dtype in not working in mad() function
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
dtype in not working in mad() function
(Jul-21-2019, 04:28 AM)ift38375 Wrote: df = pd.DataFrame(diSales, dtype=pd.Int32Dtype()).why ? What is use of this line ?
This is about new Pandas feature, see docs here.
if you call, you find that the data frame is of integer type; Nevertheless, .mad method, along with .mean method, still automatically convert it to a float type. So, the result of .mad execution has <float> type.

Messages In This Thread
RE: dtype in not working in mad() function - by scidam - Jul-21-2019, 11:05 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Pandas replace function not working on datafram with floats bcrypto 1 951 Apr-12-2021, 08:59 PM
Last Post: bcrypto
  Data dtype error according to the rule "safe" AndreasMavro 5 5,556 Feb-27-2020, 10:46 PM
Last Post: Pama
  ValueError: Input contains infinity or a value too large for dtype('float64') Rabah_r 1 10,797 Apr-06-2019, 11:08 AM
Last Post: scidam
  numpy dtype anomaly bluefrog 4 2,138 Nov-07-2018, 12:37 AM
Last Post: bluefrog

Forum Jump:

User Panel Messages

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