# openai · R2 · run 2
- Model requested: `gpt-6.2-astra` · reported: `gpt-6.2-astra`
- Started 2026-12-04T18:42:29+05:30 · finished 2026-12-04T18:43:54+05:30 · latency 85 s
- Tokens: {"in": 16802, "out": 1735, "cache_read": 1223, "cache_write": 0, "reasoning": 1281} · cost estimate $0.235
- System prompt: none · effort: medium
## Prompt
```
Here's our data. Anything I should know?
```
Files attached: invoices.csv, credit_notes.csv, customers.csv, columns_note.txt
## Transcript
**Code (code_interpreter):**
```
import os
print(os.listdir('/mnt/data'))
```
**Output:**
```
['file-QXYxyYcvj9dKA97xg6DwuD-customers.csv', 'file-148GQJApHG1xhKW5X6RUu8-credit_notes.csv', 'file-WyCJ1nkdKgEBXgV8KszbNP-columns_note.txt', 'file-FtYTGgPNtsfpqzYdz6FNSx-invoices.csv']
```
**Code (code_interpreter):**
```
import pandas as pd,glob
def path(s):return glob.glob('/mnt/data/*'+s)[0]
print(open(path('.txt')).read())
c,n,i=[pd.read_csv(path(s)) for s in ['customers.csv','credit_notes.csv','invoices.csv']]
for d in [c,n,i]:print(d.shape,d.head().to_string(index=False),d.isna().sum(),sep='\n')
```
**Output:**
```
Indigo Thread Co. - export from the ERP (sales ledger). Three tables, CSV, all history from April 2024 up to 31 Oct 2026.
Amounts are in Indian rupees (INR) unless a column says otherwise.
invoices.csv - one row per sales invoice
invoice_id internal id of the invoice
invoice_no invoice number as printed
invoice_date date of the invoice
customer_id links to customers.customer_id
currency currency the invoice was raised in (INR or EUR)
fx_rate rupees per unit of that currency, used to convert
amount_fc amount in the invoice currency (blank for INR invoices)
net_amount invoice value in INR, before GST
gst_amount GST charged, in INR
gross_amount net_amount + gst_amount
order_ref sales order the invoice was raised against
created_at when the row was entered in the ERP
credit_notes.csv - one row per credit note issued to a customer
cn_id internal id of the credit note
cn_no credit note number
cn_date date of the credit note
invoice_id the invoice it credits (links to invoices.invoice_id)
customer_id links to customers.customer_id
net_amount credit value in INR, before GST (a positive number that reduces revenue)
gst_amount GST reversed, in INR
reason reason recorded for the credit
created_at when the row was entered in the ERP
customers.csv - one row per customer account
customer_id internal id
customer_code customer code
name customer name
region sales region the account is managed under (South, West, East, North, Export)
city customer's city
segment account size band used by sales (key, mid, small)
currency usual invoicing currency
status account status in the ERP (active / inactive)
payment_terms_days agreed payment terms in days
credit_limit credit limit in INR
created_at when the account was created
Net revenue, as the company reports it from these tables: invoice net_amount minus credit note net_amount, by date.
(143, 11)
customer_id customer_code name region city segment currency status payment_terms_days credit_limit created_at
1 C0001 Ravira Exports South Tiruppur key INR active 30 33600000.0 2023-08-05 17:08:04
2 C0002 Tessora EU South Rotterdam key EUR active 45 43700000.0 2021-12-11 17:53:30
3 C0003 Skarfab South Aarhus key EUR active 45 22800000.0 2022-05-07 16:51:47
4 C0004 Merai Apparels West Mumbai key INR active 30 15600000.0 2022-03-02 17:53:33
5 C0005 Shree Varada Textiles South Tiruppur mid INR active 30 6000000.0 2022-02-01 14:58:43
customer_id 0
customer_code 0
name 0
region 0
city 0
segment 0
currency 0
status 0
payment_terms_days 0
credit_limit 0
created_at 0
dtype: int64
(860, 9)
cn_id cn_no cn_date invoice_id customer_id net_amount gst_amount reason created_at
1 CN/000001 2024-04-08 5448 50 3874.57 193.73 Quality claim 2024-04-08 16:30:56
2 CN/000002 2024-04-10 5433 142 5507.46 275.37 Return 2024-04-10 15:27:01
3 CN/000003 2024-04-13 5489 6 18492.12 924.61 Rate difference 2024-04-13 14:00:56
4 CN/000004 2024-04-18 5441 143 5035.80 251.79 Quality claim 2024-04-18 16:26:02
5 CN/000005 2024-04-24 5523 42 69088.99 0.00 Return 2024-04-24 15:16:58
cn_id 0
cn_no 0
cn_date 0
invoice_id 0
customer_id 0
net_amount 0
gst_amount 0
reason 0
created_at 0
dtype: int64
(8772, 12)
invoice_id invoice_no invoice_date customer_id currency fx_rate amount_fc net_amount gst_amount gross_amount order_ref created_at
5411 BI/2425/000001 2024-04-01 11 INR 1.0000 NaN 117738.91 5886.95 123625.86 SO-24005358 2024-04-01 18:43:04
5412 BI/2425/000002 2024-04-01 21 EUR 100.6756 3671.5 369630.47 0.00 369630.47 SO-24005296 2024-04-01 17:59:42
5413 BI/2425/000003 2024-04-01 95 INR 1.0000 NaN 67337.59 3366.88 70704.47 SO-24005494 2024-04-01 19:00:03
5414 BI/2425/000004 2024-04-01 99 INR 1.0000 NaN 56480.17 2824.01 59304.18 SO-24005522 2024-04-01 19:02:32
5415 BI/2425/000005 2024-04-01 104 INR 1.0000 NaN 22867.57 1143.38 24010.95 SO-24005445 2024-04-01 13:56:45
invoice_id 0
invoice_no 0
invoice_date 0
customer_id 0
currency 0
fx_rate 0
amount_fc 7212
net_amount 0
gst_amount 0
gross_amount 0
order_ref 0
created_at 0
dtype: int64
```
**Code (code_interpreter):**
```
i['m']=i.invoice_date.str[:7];n['m']=n.cn_date.str[:7]
t=pd.concat([i.groupby('m').net_amount.sum(),n.groupby('m').net_amount.sum()],axis=1)/1e7
t.columns=['inv','cn'];t['net']=t.inv-t.cn;print(t.round(3))
print(n.groupby('reason').net_amount.agg(['size','sum']))
print(i.nlargest(20,'net_amount').to_string(index=False))
```
**Output:**
```
inv cn net
m
2024-04 4.226 0.012 4.214
2024-05 4.354 0.052 4.302
2024-06 4.515 0.081 4.434
2024-07 4.383 0.081 4.302
2024-08 4.108 0.067 4.041
2024-09 4.501 0.068 4.433
2024-10 4.417 0.072 4.345
2024-11 4.327 0.068 4.259
2024-12 4.475 0.044 4.431
2025-01 4.330 0.114 4.216
2025-02 4.300 0.041 4.259
2025-03 5.023 0.112 4.912
2025-04 4.579 0.080 4.499
2025-05 4.646 0.055 4.591
2025-06 4.824 0.093 4.731
2025-07 4.746 0.153 4.593
2025-08 4.360 0.045 4.315
2025-09 4.797 0.068 4.729
2025-10 4.715 0.075 4.640
2025-11 4.587 0.039 4.548
2025-12 4.811 0.080 4.731
2026-01 4.539 0.041 4.497
2026-02 4.599 0.053 4.546
2026-03 5.311 0.069 5.242
2026-04 4.773 0.101 4.672
2026-05 4.834 0.070 4.764
2026-06 5.017 0.106 4.910
2026-07 4.814 0.049 4.765
2026-08 4.543 0.069 4.474
2026-09 4.907 0.087 4.820
2026-10 4.784 0.149 4.635
size sum
reason
Quality claim 187 5076391.88
Rate difference 241 5903927.68
Return 432 11961254.19
invoice_id invoice_no invoice_date customer_id currency fx_rate amount_fc net_amount gst_amount gross_amount order_ref created_at m
13775 BI/2627/001521 2026-09-26 2 EUR 98.1359 30990.24 3041255.09 0.00 3041255.09 SO-26013446 2026-09-26 14:09:16 2026-09
7864 BI/2425/002454 2024-12-30 2 EUR 100.3529 27790.35 2788842.21 0.00 2788842.21 SO-24007453 2024-12-30 12:48:20 2024-12
13546 BI/2627/001292 2026-08-29 1 INR 1.0000 NaN 2633541.50 131677.08 2765218.58 SO-26013206 2026-08-29 18:21:11 2026-08
10413 BI/2526/001705 2025-09-30 2 EUR 100.3276 25080.68 2516284.43 0.00 2516284.43 SO-25009909 2025-09-30 14:10:45 2025-09
6168 BI/2425/000758 2024-06-29 1 INR 1.0000 NaN 2466507.91 123325.40 2589833.31 SO-24005649 2024-06-29 14:31:10 2024-06
14059 BI/2627/001805 2026-10-22 4 INR 1.0000 NaN 2290465.44 114523.27 2404988.71 SO-26013507 2026-10-22 18:12:49 2026-10
9534 BI/2526/000826 2025-06-28 1 INR 1.0000 NaN 2241958.80 112097.94 2354056.74 SO-25009154 2025-06-28 15:51:09 2025-06
6642 BI/2425/001232 2024-08-20 2 EUR 100.0343 22135.38 2214297.24 0.00 2214297.24 SO-24006210 2024-08-20 14:33:22 2024-08
6005 BI/2425/000595 2024-06-12 2 EUR 99.3753 22204.65 2206593.76 0.00 2206593.76 SO-24005608 2024-06-12 14:46:36 2024-06
12450 BI/2627/000196 2026-04-24 1 INR 1.0000 NaN 2109484.07 105474.20 2214958.27 SO-26012179 2026-04-24 11:11:32 2026-04
8648 BI/2425/003238 2025-03-28 1 INR 1.0000 NaN 2084867.82 104243.39 2189111.21 SO-25008127 2025-03-28 12:59:51 2025-03
11571 BI/2526/002863 2026-01-26 2 EUR 101.6531 19375.67 1969596.92 0.00 1969596.92 SO-25011182 2026-01-26 19:34:16 2026-01
7234 BI/2425/001824 2024-10-26 1 INR 1.0000 NaN 1913302.94 95665.15 2008968.09 SO-24006742 2024-10-26 11:23:04 2024-10
12401 BI/2627/000147 2026-04-18 1 INR 1.0000 NaN 1896869.63 94843.48 1991713.11 SO-26011810 2026-04-18 12:01:09 2026-04
12916 BI/2627/000662 2026-06-13 2 EUR 100.8919 18506.91 1867197.31 0.00 1867197.31 SO-26012528 2026-06-13 14:39:54 2026-06
12689 BI/2627/000435 2026-05-16 2 EUR 100.9104 18349.67 1851672.54 0.00 1851672.54 SO-26012429 2026-05-16 17:48:17 2026-05
12515 BI/2627/000261 2026-04-30 1 INR 1.0000 NaN 1851426.79 92571.34 1943998.13 SO-26012020 2026-04-30 16:12:43 2026-04
6988 BI/2425/001578 2024-09-28 2 EUR 99.2936 18571.86 1844066.84 0.00 1844066.84 SO-24006620 2024-09-28 10:00:03 2024-09
5891 BI/2425/000481 2024-05-25 2 EUR 99.8249 17904.87 1787351.86 0.00 1787351.86 SO-24005366 2024-05-25 11:40:04 2024-05
6169 BI/2425/000759 2024-06-29 2 EUR 98.9133 17979.74 1778435.42 0.00 1778435.42 SO-24005736 2024-06-29 11:59:58 2024-06
```
**Code (code_interpreter):**
```
r=pd.concat([i[['customer_id','m','net_amount']],n[['customer_id','m','net_amount']].assign(net_amount=-n.net_amount)]).merge(c,on='customer_id')
p=r.pivot_table(index=['customer_id','name','region'],columns='m',values='net_amount',aggfunc='sum').fillna(0)/1e7
for level in ['region','name']:
z=p.groupby(level=level).sum();print(z.iloc[:,-9:].round(2).sort_values('2026-09',ascending=False).head(15))
print(c.tail(15).to_string(index=False))
print(i[i.order_ref.duplicated(False)].shape)
```
**Output:**
```
m 2026-02 2026-03 2026-04 2026-05 2026-06 2026-07 2026-08 \
region
South 2.53 3.08 2.83 2.38 2.81 2.81 2.48
West 0.89 0.87 0.66 0.72 0.60 0.80 0.52
Export 0.53 0.40 0.44 0.82 0.41 0.34 0.72
North 0.33 0.63 0.51 0.56 0.70 0.54 0.44
East 0.27 0.27 0.23 0.29 0.39 0.29 0.31
m 2026-09 2026-10
region
South 2.83 1.43
West 0.70 1.92
Export 0.52 0.52
North 0.42 0.42
East 0.34 0.34
m 2026-02 2026-03 2026-04 2026-05 2026-06 2026-07 \
name
Tessora EU 0.28 0.22 0.20 0.44 0.28 0.26
Ravira Exports 0.39 0.49 0.83 0.35 0.41 0.60
Skarfab 0.27 0.26 0.21 0.25 0.24 0.35
Bernalp Stoff 0.03 0.06 0.03 0.03 0.06 0.10
Wattmeer Textil 0.10 0.05 0.03 0.06 0.00 0.00
Kempen Linnen 0.03 0.02 0.00 0.03 0.04 0.00
Elbtal Garn 0.02 0.13 0.00 0.06 0.04 0.11
Perivra Knitwear 0.00 0.00 0.00 0.08 -0.01 0.00
Dalmara Moda 0.05 0.15 0.10 0.00 0.07 0.03
Atelier Saône 0.00 0.00 0.00 0.05 0.03 0.04
Avonmere Cloth Co 0.05 0.03 0.00 0.06 0.06 0.08
Varavra Garments 0.07 0.08 0.09 0.08 0.19 0.00
Noyvra Weaves 0.04 0.08 0.07 0.06 0.10 0.07
Narvia Weave 0.06 0.00 0.00 0.03 0.13 0.09
Castelino 0.03 0.06 0.00 0.10 0.10 0.13
m 2026-08 2026-09 2026-10
name
Tessora EU 0.31 0.59 0.11
Ravira Exports 0.63 0.43 0.21
Skarfab 0.25 0.37 0.06
Bernalp Stoff 0.00 0.14 0.06
Wattmeer Textil 0.00 0.13 0.03
Kempen Linnen 0.02 0.11 0.05
Elbtal Garn 0.06 0.11 0.09
Perivra Knitwear 0.03 0.10 0.03
Dalmara Moda 0.04 0.09 0.07
Atelier Saône 0.00 0.09 -0.00
Avonmere Cloth Co 0.13 0.09 0.05
Varavra Garments 0.00 0.09 0.04
Noyvra Weaves 0.05 0.08 0.02
Narvia Weave 0.04 0.08 0.01
Castelino 0.07 0.07 0.09
customer_id customer_code name region city segment currency status payment_terms_days credit_limit created_at
129 C0129 Kanvira Clothing North Jaipur small INR active 30 1400000.0 2021-03-02 13:28:02
130 C0130 Udavra Knitwear North Panipat small INR active 30 1700000.0 2022-05-02 10:53:43
131 C0131 Satvira Fabrics North Ludhiana small INR active 30 1800000.0 2023-06-01 14:21:53
132 C0132 Kosra Textiles North Delhi small INR active 30 1400000.0 2024-07-02 12:32:24
133 C0133 Perivra Apparels East Kolkata small INR active 30 1800000.0 2021-03-02 10:32:12
134 C0134 Brahmavra Wear East Bhubaneswar small INR active 30 1800000.0 2022-09-01 17:00:27
135 C0135 Mahanvi Creations East Howrah small INR active 30 1600000.0 2023-10-02 10:39:19
136 C0136 Sabarvi Fashions East Guwahati small INR active 30 1800000.0 2024-11-01 10:52:19
137 C0137 Tungavra Garments South Madurai small INR active 30 1400000.0 2021-03-02 11:19:19
138 C0138 Kalvira Overseas South Tiruppur small INR active 30 1300000.0 2022-01-02 12:57:44
139 C0139 Magvira Knitwear South Bengaluru small INR active 30 1300000.0 2024-03-02 13:10:47
140 C0140 Vidarva Fabrics South Chennai small INR active 30 1600000.0 2021-03-02 15:00:51
141 C0141 Bundra Textiles Old North Ludhiana small INR inactive 30 1800000.0 2021-12-11 14:59:54
142 C0142 Satvira Exports West Mumbai small INR inactive 30 1800000.0 2022-01-11 09:50:20
143 C0143 Kosra Garments East Kolkata small INR inactive 30 1800000.0 2022-02-08 11:57:54
(0, 13)
```
**Code (code_interpreter):**
```
print(p.iloc[:,-2:].assign(diff=p.iloc[:,-1]-p.iloc[:,-2]).sort_values('diff').iloc[list(range( -10,0))+list(range(8))])
print(c.head(22))
o=i[i.m=='2026-10'];print(o.groupby('customer_id').net_amount.agg(['sum','size']).nlargest(15,'sum'))
print(n[n.m=='2026-10'].groupby(['customer_id','reason']).net_amount.sum().nlargest(15))
```
**Output:**
```
m 2026-09 2026-10 diff
customer_id name region
63 Kalvira Textiles East 0.055670 0.088861 0.033191
112 Magvira Clothing East 0.007438 0.044894 0.037456
84 Kodavra Textiles South 0.000000 0.037472 0.037472
67 Konvira Overseas West 0.026292 0.068436 0.042144
43 Dordelle Tissus Export 0.000000 0.053905 0.053905
38 Tatrava Cloth Export 0.065858 0.125794 0.059937
60 Sahvira Garments West 0.028696 0.110155 0.081459
36 Maison Vallin Export 0.042328 0.123846 0.081518
64 Saurava Fabrics West 0.015390 0.123930 0.108540
4 Merai Apparels West 0.071285 1.237234 1.165949
2 Tessora EU South 0.586984 0.112705 -0.474279
3 Skarfab South 0.372899 0.056750 -0.316149
1 Ravira Exports South 0.429873 0.211584 -0.218288
35 Wattmeer Textil West 0.132853 0.033721 -0.099132
22 Atelier Saône Export 0.090276 -0.004521 -0.094796
39 Bernalp Stoff West 0.135349 0.055337 -0.080013
87 Ponnavra Fabrics South 0.064083 -0.014615 -0.078698
65 Perivra Knitwear South 0.097531 0.027172 -0.070359
customer_id customer_code name region city \
0 1 C0001 Ravira Exports South Tiruppur
1 2 C0002 Tessora EU South Rotterdam
2 3 C0003 Skarfab South Aarhus
3 4 C0004 Merai Apparels West Mumbai
4 5 C0005 Shree Varada Textiles South Tiruppur
5 6 C0006 Tidewell Garments South Coimbatore
6 7 C0007 Anvika Knit Works West Ahmedabad
7 8 C0008 Sanvi Weaves South Chennai
8 9 C0009 Kavira Knitwear South Kochi
9 10 C0010 Navika Fashions West Bhiwandi
10 11 C0011 Korana Clothing East Howrah
11 12 C0012 Devana Apparels South Tiruppur
12 13 C0013 Inara Creations North Noida
13 14 C0014 Maravi Linens South Bengaluru
14 15 C0015 Tarini Garments West Vapi
15 16 C0016 Nilavi Exports South Kochi
16 17 C0017 Vihana Textiles North Ludhiana
17 18 C0018 Charu Knit Fab South Madurai
18 19 C0019 Solvik Textil Export Hamburg
19 20 C0020 Haus Brenner Stoffe Export Lyon
20 21 C0021 Vela Moda Srl West Ahmedabad
21 22 C0022 Atelier Saône Export Antwerp
segment currency status payment_terms_days credit_limit \
0 key INR active 30 33600000.0
1 key EUR active 45 43700000.0
2 key EUR active 45 22800000.0
3 key INR active 30 15600000.0
4 mid INR active 30 6000000.0
5 mid INR active 30 6000000.0
6 mid INR active 30 6000000.0
7 mid INR active 30 6000000.0
8 mid INR active 30 6000000.0
9 mid INR active 30 6000000.0
10 mid INR active 30 6000000.0
11 mid INR active 30 6000000.0
12 mid INR active 30 6000000.0
13 mid INR active 30 6000000.0
14 mid INR active 30 6000000.0
15 mid INR active 30 6000000.0
16 mid INR active 30 6000000.0
17 mid INR active 30 6000000.0
18 mid EUR active 45 9900000.0
19 mid EUR active 45 9000000.0
20 mid EUR active 45 9600000.0
21 mid EUR active 45 8100000.0
created_at
0 2023-08-05 17:08:04
1 2021-12-11 17:53:30
2 2022-05-07 16:51:47
3 2022-03-02 17:53:33
4 2022-02-01 14:58:43
5 2023-03-05 18:54:32
6 2022-04-05 14:44:19
7 2023-05-07 12:59:32
8 2022-06-07 13:55:42
9 2023-07-09 18:27:26
10 2022-02-07 11:03:45
11 2023-03-11 16:57:48
12 2022-04-11 12:04:25
13 2023-05-13 14:28:48
14 2022-06-13 13:54:37
15 2023-07-15 15:58:49
16 2022-02-13 16:25:08
17 2023-03-17 09:59:58
18 2021-03-02 15:41:56
19 2022-04-01 16:27:17
20 2023-05-02 10:03:45
21 2021-06-01 16:38:04
sum size
customer_id
4 12504636.46 14
1 2115844.40 2
38 1306962.42 4
64 1239301.93 3
36 1238462.44 4
2 1127046.45 1
60 1101554.15 4
37 948245.17 4
42 939392.92 4
63 888607.23 4
3 769804.05 1
33 747004.31 3
67 684363.41 2
77 678083.77 4
40 667751.08 2
customer_id reason
87 Return 390720.93
3 Rate difference 202303.92
87 Rate difference 190157.81
4 Rate difference 78261.72
77 Return 72439.02
73 Return 56600.10
4 Return 54036.13
38 Return 49021.17
79 Rate difference 47092.57
22 Rate difference 45205.69
35 Return 44957.99
34 Return 43012.71
28 Rate difference 36192.57
21 Return 33152.25
82 Rate difference 29878.68
Name: net_amount, dtype: float64
```
**Code (code_interpreter):**
```
print(o[o.customer_id.isin([1,2,3,4,87])].to_string(index=False))
print(n[(n.m=='2026-10') & (n.customer_id.isin([2,3,4,87]))].merge(i,on='invoice_id',suffixes=('_cn','_i'))[['cn_no','cn_date','customer_id_cn','net_amount_cn','invoice_date','net_amount_i','reason']].to_string(index=False))
print(p.iloc[:4].T.round(2))
```
**Output:**
```
invoice_id invoice_no invoice_date customer_id currency fx_rate amount_fc net_amount gst_amount gross_amount order_ref created_at m
13864 BI/2627/001610 2026-10-01 1 INR 1.0000 NaN 814968.31 40748.42 855716.73 SO-26013299 2026-10-01 16:21:39 2026-10
13878 BI/2627/001624 2026-10-02 4 INR 1.0000 NaN 369431.50 18471.58 387903.08 SO-26013587 2026-10-02 13:05:47 2026-10
13879 BI/2627/001625 2026-10-02 4 INR 1.0000 NaN 446119.76 22305.99 468425.75 SO-26013525 2026-10-02 14:44:58 2026-10
13895 BI/2627/001641 2026-10-03 87 INR 1.0000 NaN 229317.49 11465.87 240783.36 SO-26013876 2026-10-03 16:56:31 2026-10
13910 BI/2627/001656 2026-10-06 3 EUR 100.0784 7692.01 769804.05 0.00 769804.05 SO-26013435 2026-10-06 15:49:39 2026-10
13911 BI/2627/001657 2026-10-06 4 INR 1.0000 NaN 668560.31 33428.02 701988.33 SO-26013485 2026-10-06 11:29:57 2026-10
13920 BI/2627/001666 2026-10-07 4 INR 1.0000 NaN 888233.02 44411.65 932644.67 SO-26013562 2026-10-07 11:59:58 2026-10
13930 BI/2627/001676 2026-10-08 2 EUR 100.2962 11237.18 1127046.45 0.00 1127046.45 SO-26013706 2026-10-08 10:07:56 2026-10
13941 BI/2627/001687 2026-10-09 1 INR 1.0000 NaN 1300876.09 65043.80 1365919.89 SO-26013395 2026-10-09 10:08:23 2026-10
13942 BI/2627/001688 2026-10-09 4 INR 1.0000 NaN 453525.98 22676.30 476202.28 SO-26013620 2026-10-09 11:01:56 2026-10
13943 BI/2627/001689 2026-10-09 4 INR 1.0000 NaN 476277.08 23813.85 500090.93 SO-26013366 2026-10-09 14:58:00 2026-10
13980 BI/2627/001726 2026-10-15 4 INR 1.0000 NaN 478857.80 23942.89 502800.69 SO-26013628 2026-10-15 16:55:44 2026-10
14015 BI/2627/001761 2026-10-20 4 INR 1.0000 NaN 1177645.63 58882.28 1236527.91 SO-26013526 2026-10-20 19:56:25 2026-10
14035 BI/2627/001781 2026-10-21 4 INR 1.0000 NaN 1411096.81 70554.84 1481651.65 SO-26013640 2026-10-21 10:16:31 2026-10
14036 BI/2627/001782 2026-10-21 4 INR 1.0000 NaN 1591714.80 79585.74 1671300.54 SO-26013572 2026-10-21 13:08:11 2026-10
14046 BI/2627/001792 2026-10-21 87 INR 1.0000 NaN 118645.35 5932.27 124577.62 SO-26014112 2026-10-21 12:53:06 2026-10
14059 BI/2627/001805 2026-10-22 4 INR 1.0000 NaN 2290465.44 114523.27 2404988.71 SO-26013507 2026-10-22 18:12:49 2026-10
14070 BI/2627/001816 2026-10-22 87 INR 1.0000 NaN 86765.13 4338.26 91103.39 SO-26014097 2026-10-22 15:38:24 2026-10
14085 BI/2627/001831 2026-10-23 4 INR 1.0000 NaN 1163909.81 58195.49 1222105.30 SO-26013578 2026-10-23 17:32:21 2026-10
14121 BI/2627/001867 2026-10-26 4 INR 1.0000 NaN 590138.38 29506.92 619645.30 SO-26013868 2026-10-26 12:03:20 2026-10
14156 BI/2627/001902 2026-10-30 4 INR 1.0000 NaN 498660.14 24933.01 523593.15 SO-26013685 2026-10-30 11:30:06 2026-10
cn_no cn_date customer_id_cn net_amount_cn invoice_date net_amount_i reason
CN/000831 2026-10-02 3 202303.92 2026-09-19 1305960.85 Rate difference
CN/000833 2026-10-08 4 54036.13 2026-09-15 314831.26 Return
CN/000848 2026-10-19 4 78261.72 2026-10-02 446119.76 Rate difference
CN/000852 2026-10-23 87 390720.93 2026-09-19 471183.08 Return
CN/000853 2026-10-23 87 190157.81 2026-10-03 229317.49 Rate difference
customer_id 1 2 3 4
name Ravira Exports Tessora EU Skarfab Merai Apparels
region South South South West
m
2024-04 0.57 0.34 0.21 0.00
2024-05 0.37 0.30 0.26 0.14
2024-06 0.76 0.35 0.21 0.00
2024-07 0.34 0.27 0.28 0.05
2024-08 0.39 0.50 0.26 0.07
2024-09 0.44 0.34 0.24 0.00
2024-10 0.50 0.21 0.27 0.09
2024-11 0.48 0.20 0.17 0.03
2024-12 0.49 0.52 0.19 0.11
2025-01 0.41 0.21 0.33 0.04
2025-02 0.71 0.32 0.27 0.00
2025-03 0.60 0.25 0.15 0.04
2025-04 0.43 0.35 0.37 0.04
2025-05 0.56 0.38 0.17 0.00
2025-06 0.62 0.16 0.29 0.06
2025-07 0.36 0.26 0.30 0.24
2025-08 0.51 0.31 0.23 0.10
2025-09 0.46 0.35 0.41 -0.01
2025-10 0.41 0.12 0.27 0.10
2025-11 0.56 0.31 0.21 0.36
2025-12 0.56 0.46 0.20 0.17
2026-01 0.39 0.33 0.25 0.09
2026-02 0.39 0.28 0.27 0.22
2026-03 0.49 0.22 0.26 0.18
2026-04 0.83 0.20 0.21 0.24
2026-05 0.35 0.44 0.25 0.05
2026-06 0.41 0.28 0.24 0.12
2026-07 0.60 0.26 0.35 0.06
2026-08 0.63 0.31 0.25 0.05
2026-09 0.43 0.59 0.37 0.07
2026-10 0.21 0.11 0.06 1.24
```
Thinking (summary)
**Exploring anomalies**
I'm thinking there might be other significant anomalies to check. I should also look at the last three months’ end dates and analyze the trends that remain.
**Code (code_interpreter):**
```
h=i[i.customer_id.isin([1,2,3])].copy();h['day']=h.invoice_date.str[-2:].astype(int);print(h.groupby(['customer_id','m']).day.max().groupby(level=0).describe())
for a in [1,2,3]:
print(a,h[h.customer_id==a].groupby('m').day.max().value_counts())
print(t.iloc[-7:].sum(), t.iloc[-19:-12].sum())
q=p.iloc[:,-2:].groupby(level='region').sum();print(q)
print(i[i.customer_id==4].groupby('m').size().describe())
```
**Output:**
```
count mean std min 25% 50% 75% max
customer_id
1 31.0 27.322581 3.952949 9.0 26.0 28.0 29.5 31.0
2 31.0 24.516129 5.271755 8.0 22.0 25.0 28.5 31.0
3 31.0 25.838710 4.865503 6.0 24.0 26.0 29.0 31.0
1 day
30 5
29 5
28 5
26 4
27 4
31 3
25 2
24 2
9 1
Name: count, dtype: int64
2 day
30 5
25 3
28 3
24 3
29 2
23 2
27 2
26 2
19 2
18 2
31 1
15 1
21 1
20 1
8 1
Name: count, dtype: int64
3 day
31 6
24 4
22 4
28 4
29 3
26 3
27 2
25 2
23 1
21 1
6 1
Name: count, dtype: int64
inv 33.672205
cn 0.630978
net 33.041227
dtype: float64 inv 32.667229
cn 0.568345
net 32.098884
dtype: float64
m 2026-09 2026-10
region
East 0.339927 0.339995
Export 0.520800 0.520800
North 0.421369 0.421334
South 2.834373 1.431287
West 0.703450 1.921742
count 25.000000
mean 2.800000
std 2.708013
min 1.000000
25% 1.000000
50% 2.000000
75% 4.000000
max 14.000000
dtype: float64
```
**Code (code_interpreter):**
```
print(i.groupby('currency').fx_rate.describe());print(o[o.currency=='EUR'].fx_rate.describe())
print(i.groupby('m').size().tail()); print((i.net_amount-i.fx_rate*i.amount_fc).abs().describe())
x=n.merge(i,on='invoice_id');print((x.customer_id_x!=x.customer_id_y).sum());print(n.groupby('invoice_id').size().max())
print((o[(o.customer_id==4)&o.invoice_date.between('2026-10-20','2026-10-23')].net_amount.sum())/1e5)
```
**Output:**
```
count mean std min 25% 50% 75% \
currency
EUR 1560.0 99.757601 1.42183 95.9253 98.8594 99.8257 100.6514
INR 7212.0 1.000000 0.00000 1.0000 1.0000 1.0000 1.0000
max
currency
EUR 102.8432
INR 1.0000
count 52.00000
mean 100.27165
std 0.28776
min 99.77600
25% 100.07840
50% 100.23435
75% 100.41850
max 101.04720
Name: fx_rate, dtype: float64
m
2026-06 267
2026-07 245
2026-08 237
2026-09 293
2026-10 319
dtype: int64
count 1560.000000
mean 0.002556
std 0.001434
min 0.000000
25% 0.001361
50% 0.002582
75% 0.003800
max 0.005000
dtype: float64
0
1
76.34832490000001
```
**Code (code_interpreter):**
```
print(i.merge(c,on='customer_id').query("region=='South' and m=='2026-10'").groupby('customer_id').invoice_date.max().value_counts().sort_index())
print(i.merge(c,on='customer_id').query("region=='South' and m=='2026-10'").groupby('customer_id').net_amount.agg(['size','sum']).head(20))
```
**Output:**
```
invoice_date
2026-10-02 2
2026-10-03 1
2026-10-06 1
2026-10-08 2
2026-10-09 2
2026-10-12 2
2026-10-14 1
2026-10-15 1
2026-10-16 3
2026-10-17 2
2026-10-19 2
2026-10-20 2
2026-10-21 1
2026-10-22 3
2026-10-23 5
2026-10-24 5
2026-10-26 3
2026-10-27 2
2026-10-28 3
2026-10-29 3
2026-10-30 5
2026-10-31 7
Name: count, dtype: int64
size sum
customer_id
1 2 2115844.40
2 1 1127046.45
3 1 769804.05
31 3 489210.31
40 2 667751.08
45 1 39806.35
47 1 21467.05
48 3 86144.21
49 3 92620.72
50 2 93452.62
53 5 203503.72
54 1 26821.37
55 3 123745.10
56 3 130676.29
57 2 57113.67
58 4 147242.37
59 3 95303.80
61 3 393753.41
65 2 271720.80
73 3 327411.32
```
**Code (code_interpreter):**
```
print(p.iloc[:44,-8:].round(2).to_string())
```
**Output:**
```
m 2026-03 2026-04 2026-05 2026-06 2026-07 2026-08 2026-09 2026-10
customer_id name region
1 Ravira Exports South 0.49 0.83 0.35 0.41 0.60 0.63 0.43 0.21
2 Tessora EU South 0.22 0.20 0.44 0.28 0.26 0.31 0.59 0.11
3 Skarfab South 0.26 0.21 0.25 0.24 0.35 0.25 0.37 0.06
4 Merai Apparels West 0.18 0.24 0.05 0.12 0.06 0.05 0.07 1.24
5 Shree Varada Textiles South 0.12 0.06 0.08 0.04 0.01 0.00 0.00 0.00
6 Tidewell Garments South 0.05 0.07 0.05 0.05 0.02 0.00 0.00 0.00
7 Anvika Knit Works West 0.06 0.03 0.04 0.04 0.00 0.00 0.00 0.00
8 Sanvi Weaves South 0.04 0.03 0.03 0.03 0.01 0.00 0.00 0.00
9 Kavira Knitwear South 0.03 0.03 0.03 0.01 0.01 0.00 0.00 0.00
10 Navika Fashions West 0.03 0.03 0.02 0.02 0.00 0.00 0.00 0.00
11 Korana Clothing East 0.02 0.03 0.02 0.02 0.01 0.00 0.00 0.00
12 Devana Apparels South 0.04 0.02 0.01 0.02 0.00 0.00 0.00 0.00
13 Inara Creations North 0.02 0.03 0.02 0.02 0.01 0.00 0.00 0.00
14 Maravi Linens South 0.03 0.02 0.01 0.01 0.00 0.00 0.00 0.00
15 Tarini Garments West 0.02 0.02 0.03 0.01 0.01 -0.00 0.00 0.00
16 Nilavi Exports South 0.03 0.02 0.01 0.01 0.01 0.00 0.00 0.00
17 Vihana Textiles North 0.02 0.02 0.02 0.01 0.00 0.00 0.00 0.00
18 Charu Knit Fab South 0.01 0.02 0.02 0.01 0.00 0.00 0.00 0.00
19 Solvik Textil Export 0.05 0.03 0.06 0.16 0.02 0.05 0.00 0.02
20 Haus Brenner Stoffe Export 0.03 0.08 0.00 0.03 0.02 0.06 0.05 0.04
21 Vela Moda Srl West 0.17 0.00 0.06 0.04 0.04 0.00 0.02 0.05
22 Atelier Saône Export 0.00 0.00 0.05 0.03 0.04 0.00 0.09 -0.00
23 Van Rijt Stoffen West 0.04 0.00 0.04 0.00 0.12 0.05 0.02 0.02
24 Moda Castella North 0.05 0.03 0.06 0.08 0.02 0.02 0.00 0.03
25 Kaskaro Textil Export 0.04 0.00 0.07 0.08 0.03 0.00 0.05 0.01
26 Avonmere Cloth Co West 0.03 0.00 0.06 0.06 0.08 0.13 0.09 0.05
27 Kurlan Weave North 0.04 0.01 0.05 0.01 0.06 0.10 0.00 0.00
28 Dravia Fabrics Export 0.00 0.00 0.05 0.00 0.06 0.04 0.07 -0.00
29 Mondelo Têxteis West 0.02 0.10 0.02 0.05 0.09 0.08 0.07 0.02
30 Skerry Apparel North 0.05 0.04 0.02 0.07 0.05 0.03 0.07 0.01
31 Kempen Linnen South 0.02 0.00 0.03 0.04 0.00 0.02 0.11 0.05
32 Firnhang Tuch East 0.08 0.03 0.05 0.09 0.03 0.00 0.07 0.05
33 Moselweber Export 0.04 0.04 0.14 -0.00 0.04 0.24 0.05 0.07
34 Tessuti Ombra Export 0.02 0.10 0.11 0.06 0.02 0.02 0.04 0.03
35 Wattmeer Textil West 0.05 0.03 0.06 0.00 0.00 0.00 0.13 0.03
36 Maison Vallin Export 0.09 0.00 0.12 0.00 0.00 0.17 0.04 0.12
37 Castelino North 0.06 0.00 0.10 0.10 0.13 0.07 0.07 0.09
38 Tatrava Cloth Export 0.04 0.03 0.08 0.03 0.02 0.06 0.07 0.13
39 Bernalp Stoff West 0.06 0.03 0.03 0.06 0.10 0.00 0.14 0.06
40 Dalmara Moda South 0.15 0.10 0.00 0.07 0.03 0.04 0.09 0.07
41 Scheldra Weefsels Export 0.04 0.13 0.06 0.02 0.07 0.03 0.07 0.05
42 Elbtal Garn North 0.13 0.00 0.06 0.04 0.11 0.06 0.11 0.09
43 Dordelle Tissus Export 0.05 0.02 0.08 0.00 0.03 0.06 0.00 0.05
44 Narvia Weave East 0.00 0.00 0.03 0.13 0.09 0.04 0.08 0.01
```
**Code (code_interpreter):**
```
print(p.iloc[4:18].sum().round(3))
print(i[i.customer_id.between(5,18)].groupby('m').size()); print(i[i.customer_id.between(5,18)].groupby('customer_id').invoice_date.max())
e=i[i.currency=='EUR']; print((e.groupby('m').agg({'amount_fc':'sum','net_amount':'sum','fx_rate':'mean'}) ).tail(15))
```
**Output:**
```
m
2024-04 0.435
2024-05 0.495
2024-06 0.447
2024-07 0.484
2024-08 0.462
2024-09 0.497
2024-10 0.412
2024-11 0.464
2024-12 0.476
2025-01 0.480
2025-02 0.423
2025-03 0.442
2025-04 0.477
2025-05 0.501
2025-06 0.411
2025-07 0.501
2025-08 0.459
2025-09 0.490
2025-10 0.442
2025-11 0.417
2025-12 0.498
2026-01 0.503
2026-02 0.404
2026-03 0.508
2026-04 0.433
2026-05 0.380
2026-06 0.308
2026-07 0.081
2026-08 -0.000
2026-09 0.000
2026-10 0.000
dtype: float64
m
2024-04 49
2024-05 54
2024-06 48
2024-07 53
2024-08 55
2024-09 49
2024-10 52
2024-11 52
2024-12 50
2025-01 54
2025-02 48
2025-03 49
2025-04 50
2025-05 56
2025-06 45
2025-07 54
2025-08 50
2025-09 52
2025-10 53
2025-11 48
2025-12 53
2026-01 55
2026-02 46
2026-03 52
2026-04 52
2026-05 44
2026-06 30
2026-07 11
dtype: int64
customer_id
5 2026-07-12
6 2026-07-02
7 2026-06-28
8 2026-07-20
9 2026-07-08
10 2026-06-30
11 2026-07-25
12 2026-06-22
13 2026-07-16
14 2026-06-18
15 2026-07-29
16 2026-07-04
17 2026-06-26
18 2026-07-01
Name: invoice_date, dtype: object
amount_fc net_amount fx_rate
m
2025-08 144341.42 14140706.85 97.937608
2025-09 210667.09 21004113.42 99.659370
2025-10 153273.26 15353550.29 100.190381
2025-11 139641.08 14094894.05 100.995806
2025-12 178154.86 18227704.43 102.334591
2026-01 198016.00 20227582.38 102.165383
2026-02 167965.93 17093890.84 101.760881
2026-03 184509.75 18622866.12 100.905982
2026-04 123612.96 12464173.15 100.818667
2026-05 215227.54 21734664.52 101.015526
2026-06 180383.14 18203814.01 100.928635
2026-07 191792.18 19161224.79 99.868319
2026-08 195118.88 19328909.93 99.058422
2026-09 262475.72 25755677.10 98.205645
2026-10 138050.70 13841144.28 100.271650
```
Thinking (summary)
**Analyzing revenue patterns**
I'm exploring how monthly revenue trends could inform long-term insights. I should consider comparing full months and their habits to identify any concentration in revenue streams.
**Code (code_interpreter):**
```
print(p.iloc[4:18,12:24].sum().sum()/12)
print(c.iloc[4:18].status)
print((1-(t.net.iloc[-1]-p.iloc[3,-1])/(t.net.iloc[-2]-p.iloc[3,-2])))
```
**Output:**
```
0.46762502283333335
4 active
5 active
6 active
7 active
8 active
9 active
10 active
11 active
12 active
13 active
14 active
15 active
16 active
17 active
Name: status, dtype: object
0.2844417796519788
```
**Assistant:**
October 2026 net revenue was **₹4.64 crore**, almost unchanged from October 2025 and down 3.8% from September. **That flat year-on-year result hides a shift: several regular customers stopped being invoiced, while one unusually large month at Merai Apparels offset much of the decline.**
- **Fourteen regular accounts have gone quiet.** Accounts C0005–C0018, all still marked active, averaged **₹46.8 lakh in combined monthly net revenue** from April 2025 through March 2026. Their invoice count fell from 52 in April to 44 in May, 30 in June and 11 in July. None had an invoice in August, September or October. This is the first group I’d ask sales to review: did orders stop, or did billing move to different accounts?
- **Three key South accounts stopped being invoiced unusually early in October.** Skarfab’s last invoice was October 6, Tessora EU’s was October 8 and Ravira Exports’ was October 9. For each customer, that was its earliest last invoice day in the 31-month history. Together, their net revenue fell from **₹1.39 crore in September to ₹38.1 lakh in October**. Check open orders, dispatches and early-November invoices before treating this as lost demand.
- **Merai Apparels accounted for 27% of October net revenue.** Its net revenue rose from **₹7.1 lakh in September to ₹1.24 crore in October**, well above its previous monthly high of ₹36 lakh. Excluding Merai, company net revenue fell **28.4%** month on month. Confirm whether those 14 October invoices reflect repeat orders or a one-off purchase before using October to forecast sales.
April–October net revenue was still **up 2.9% year on year**, at ₹33.04 crore. The immediate question is whether Merai’s increase is repeatable and whether the missing orders elsewhere are delayed or gone. The ledger shows the billing pattern, not the cause; all revenue figures above exclude GST and deduct credit notes on the date issued.
## Final answer (scored)
October 2026 net revenue was **₹4.64 crore**, almost unchanged from October 2025 and down 3.8% from September. **That flat year-on-year result hides a shift: several regular customers stopped being invoiced, while one unusually large month at Merai Apparels offset much of the decline.**
- **Fourteen regular accounts have gone quiet.** Accounts C0005–C0018, all still marked active, averaged **₹46.8 lakh in combined monthly net revenue** from April 2025 through March 2026. Their invoice count fell from 52 in April to 44 in May, 30 in June and 11 in July. None had an invoice in August, September or October. This is the first group I’d ask sales to review: did orders stop, or did billing move to different accounts?
- **Three key South accounts stopped being invoiced unusually early in October.** Skarfab’s last invoice was October 6, Tessora EU’s was October 8 and Ravira Exports’ was October 9. For each customer, that was its earliest last invoice day in the 31-month history. Together, their net revenue fell from **₹1.39 crore in September to ₹38.1 lakh in October**. Check open orders, dispatches and early-November invoices before treating this as lost demand.
- **Merai Apparels accounted for 27% of October net revenue.** Its net revenue rose from **₹7.1 lakh in September to ₹1.24 crore in October**, well above its previous monthly high of ₹36 lakh. Excluding Merai, company net revenue fell **28.4%** month on month. Confirm whether those 14 October invoices reflect repeat orders or a one-off purchase before using October to forecast sales.
April–October net revenue was still **up 2.9% year on year**, at ₹33.04 crore. The immediate question is whether Merai’s increase is repeatable and whether the missing orders elsewhere are delayed or gone. The ledger shows the billing pattern, not the cause; all revenue figures above exclude GST and deduct credit notes on the date issued.