Search found 119 matches
- Thu Dec 11, 2025 12:33 pm
- Forum: 1. Python For Data Science
- Topic: File Operations - Text File
- Replies: 4
- Views: 105
Re: File Operations - excel file with index
import pandas as pd from openpyxl import load_workbook from openpyxl.utils import get_column_letter from openpyxl.styles import Font # Sample data df_sales = pd.DataFrame({"Product": ["A", "B"], "Qty": [10, 20]}) df_customers = pd.DataFrame({"Customer&qu...
- Thu Dec 11, 2025 12:17 pm
- Forum: 1. Python For Data Science
- Topic: File Operations - Text File
- Replies: 4
- Views: 105
Re: File Operations - Text File
import pandas as pd # Example dataframes df_sales = pd.DataFrame({ "Product": ["A", "B", "C"], "Qty": [10, 20, 30] }) df_customers = pd.DataFrame({ "Customer": ["X", "Y", "Z"], "City": ["Chennai...
- Wed Sep 24, 2025 1:47 pm
- Forum: 2. Data Analysis for Python
- Topic: Pandas tally connect without prompt
- Replies: 1
- Views: 82
Streamlit app
import streamlit as st import pandas as pd import pyodbc from io import BytesIO # ========================= # SETTINGS # ========================= TALLY_DSN = "TallyODBC64_9000" # Change as per your DSN # ========================= # STREAMLIT UI # ========================= st.set_page_con...
- Sun Sep 21, 2025 6:32 am
- Forum: 1. Python For Data Science
- Topic: CA Use Case of List, Tuple And Dictionary
- Replies: 8
- Views: 51
Re: Company Law Use case
Code: Select all
promoter = [60000, 62000, 61000]
public = [40000, 38000, 39000]
total = [p+q for p,q in zip(promoter, public)]
promoter_pct = [round(p/t*100,2) for p,t in zip(promoter, total)]
print("Promoter % over years:", promoter_pct)
- Sun Sep 21, 2025 6:31 am
- Forum: 1. Python For Data Science
- Topic: CA Use Case of List, Tuple And Dictionary
- Replies: 8
- Views: 51
Re: Costing
Code: Select all
fixed_cost = 200000
variable_cost_per_unit = 50
price_per_unit = 100
units = [1000, 2000, 3000, 4000, 5000]
profits = [u * (price_per_unit - variable_cost_per_unit) - fixed_cost for u in units]
print("Units:", units)
print("Profits:", profits)
- Sun Sep 21, 2025 6:30 am
- Forum: 1. Python For Data Science
- Topic: CA Use Case of List, Tuple And Dictionary
- Replies: 8
- Views: 51
Re: Depreciation Use case
cost = 500000 life = 5 rate = 0.2 # 20% WDV # Depreciation values per year depreciation = [round(cost * (rate**i) - cost * (rate**(i+1)), 2) for i in range(life)] book_values = [cost - sum(depreciation[:i+1]) for i in range(life)] print("Depreciation per year:", depreciation) print("...
- Sun Sep 21, 2025 6:29 am
- Forum: 1. Python For Data Science
- Topic: CA Use Case of List, Tuple And Dictionary
- Replies: 8
- Views: 51
Re: Ratio Analysis Use case
Code: Select all
profits = [50000, 60000, 55000, 70000, 80000]
sales = [200000, 250000, 240000, 280000, 300000]
# Net Profit Margin
npm = [round(p/s*100,2) for p,s in zip(profits, sales)]
print("Net Profit Margin (5 years):", npm)
print("Last 3 years:", npm[-3:])
- Sun Sep 21, 2025 6:29 am
- Forum: 1. Python For Data Science
- Topic: CA Use Case of List, Tuple And Dictionary
- Replies: 8
- Views: 51
Re:Auditing Use Case
Code: Select all
import random
vouchers = [f"VCH{i}" for i in range(1, 101)] # 100 vouchers
sample = random.sample(vouchers, 10) # select 10 random vouchers
print("Audit Sample:", sample)
- Sun Sep 21, 2025 6:28 am
- Forum: 1. Python For Data Science
- Topic: CA Use Case of List, Tuple And Dictionary
- Replies: 8
- Views: 51
Re: Budgetting Use Case
Code: Select all
cash_inflows = [100000, 120000, 110000, 90000]
cash_outflows = [80000, 95000, 105000, 88000]
net_flows = [inflows - outflows for inflows, outflows in zip(cash_inflows, cash_outflows)]
print("Net Monthly Cash Flows:", net_flows)
print("Q1 Flow:", sum(net_flows[:3]))
- Sun Sep 21, 2025 6:28 am
- Forum: 1. Python For Data Science
- Topic: CA Use Case of List, Tuple And Dictionary
- Replies: 8
- Views: 51
Re: GST Use Case
invoices = [ {"gstin":"27ABCDE1234F1Z5", "amount":50000, "type":"B2B"}, {"gstin":"29XYZ9876L2Z7", "amount":12000, "type":"Exempt"}, {"gstin":"27LMN5432K1Z9", "amount":80...