No, in-memory structures and data written to disk will almost certainly have different sizes. That's because Python objects in memory track information that is not needed when persisting (a reference count, a type pointer, weak references if the type supports it, etc.), and on-disk storage just aims at very different use cases.
For example, depending on the highest Unicode codepoint, Python strings use 1, 2 or 4 bytes per character, because that is the best trade-off to be made to make string operations efficient. But if you store that same text as UTF-8 encoded data on disk, then the variable-width encoding used means you will almost certainly need less space for the same information.
You don't specify how you are saving floats to disk, but how much space is taken up depends entirely on the storage format chosen. Floats could be written as text (writing out ASCII digits to a CSV or JSON file) or as binary C struct data, or as pickled data, or yet some other format that will have specific properties that make it suitable for specific needs. It depends on the format how much space the information will take up.
Just focus on the data written to disk, by researching the format used. Floating point numbers stored as C doubles take up 8 bytes per value, for example.