Aggregation: Implications of indexing
While there are multiple syntaxes and methods to produce the same aggregated data, those variations produce different indices. The format and contents of the index can impact other processes, such as serialization and deserialization. Consider the following artificial transactional data. txns = pd.concat([pd.DataFrame({'dt': pd.date_range("2022", freq="D", periods=10), 'amount': np.random.random(10), 'segment': ['ex'] * 10})] * 10, axis=0) dt amount segment (Timestamp(‘2022-01-01 00:00:00’), 0) 2022-01-01 00:00:00 0.992821 ex (Timestamp(‘2022-01-01 00:00:00’), 0) 2022-01-01 00:00:00 0....