Signature | Description | Parameters |
---|---|---|
template<typename ... Ts> void shrink_to_fit(); |
This will reclaim unused/reserve memory from all columns including the index. If your DataFrame has grown organically from different data sources, shrink_to_fit() could potentially reduce your memory footprint significantly. After this call, any iterator or reference you hold to any data point in the DataFrame could be invalidated. |
Ts: The list of types for all columns. A type should be specified only once. |
std::cout << "\nTesting make_consistent ..." << std::endl; df.make_consistent<int, double, std::string>(); df.shrink_to_fit<int, double, std::string>();