Python Forum
Invalid format specifier Error
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Invalid format specifier Error
#3
The code i question is:

corr = df2.corr()
plt.figure(figsize=(24,24))
sns.heatmap(corr, annot=True, fmt = ".1ft")    
I have already defined df2.

What am I doing wrong?

Respectfully,

LZ

PS
Wait, I think that know what is wrong. It should be:

fmt=' .1f' not fmt=' 1ft'

That is most likely the error.
Reply


Messages In This Thread
Invalid format specifier Error - by Led_Zeppelin - Jul-11-2022, 02:47 PM
RE: Invalid format specifier Error - by Larz60+ - Jul-11-2022, 02:51 PM
RE: Invalid format specifier Error - by Led_Zeppelin - Jul-11-2022, 03:55 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Invalid Date Format fo Cached Files jland47 1 277 May-22-2024, 07:04 PM
Last Post: deanhystad
  An unexplainable error in .format statement - but only in a larger piece of code? ToniE 4 870 Sep-05-2023, 12:50 PM
Last Post: ToniE
  error: invalid command 'egg_info' TimTu 0 1,109 Jul-27-2023, 07:30 AM
Last Post: TimTu
  [ERROR] ParamValidationError: Parameter validation failed: Invalid type for parameter gdbengo 3 12,009 Dec-26-2022, 08:48 AM
Last Post: ibreeden
  Date format error getting weekday value Aggie64 2 1,538 May-29-2022, 07:04 PM
Last Post: Aggie64
Exclamation Invalid syntax error(Predict Ethereum Price) lulu43366 2 3,329 Sep-24-2021, 01:24 PM
Last Post: lulu43366
  Unexplained Invalid syntax Error cybertooth 5 3,502 Aug-02-2021, 10:05 AM
Last Post: cybertooth
  Invalid syntax error - need help fixing calgk01 3 3,499 Feb-23-2021, 08:41 PM
Last Post: nilamo
  Error on nested loop : Invalid syntax dvazquezgu 3 3,398 Nov-25-2020, 10:04 AM
Last Post: palladium
  Invalid Syntax error Dave1835 2 2,278 Sep-21-2020, 04:38 AM
Last Post: perfringo

Forum Jump:

User Panel Messages

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