you can use sys.getsizeof() of course it's not as simple as I make it seem below but this could help.
import pandas as pd
import sys
string = pd.DataFrame({'str':['010101']},dtype='str')
cat = pd.DataFrame({'cat':['010101']}, dtype='category')
int8 = pd.DataFrame({'int':['010101']}, dtype='int8')
int32 = pd.DataFrame({'int':['010101']}, dtype='int32')
print(sys.getsizeof(string),string.dtypes)
print()
print(sys.getsizeof(cat), cat.dtypes)
print()
print(sys.getsizeof(int8), int8.dtypes)
print()
print(sys.getsizeof(int32), int32.dtypes)
out
181 str object
dtype: object
262 cat category
dtype: object
105 int int8
dtype: object
108 int int32
dtype: object