‘Column_width shrinks with shortened Table_width’,this results in unreadable data as the data is cutoff as there is not ample space to fit the data.
Below are 2 examples with shortened table_width and extended table_width.
Width of tablecolumns = 500 is only seen with extended table_width but the column_width shrinks when the table_width is shortened.
def datadicttable_func():
data_dict = {'date': ['2024-08-19', '2024-08-19', '2024-08-19', '2024-08-19', '2024-08-19', '2024-08-19', '2024-08-19', '2024-08-19', '2024-08-19', '2024-08-19', '2024-08-20', '2024-08-20', '2024-08-20', '2024-08-20', '2024-08-20', '2024-08-20', '2024-08-20', '2024-08-20', '2024-08-20', '2024-08-20', '2024-08-21', '2024-08-21', '2024-08-21', '2024-08-21', '2024-08-21', '2024-08-21', '2024-08-21', '2024-08-21', '2024-08-21', '2024-08-21', '2024-08-22', '2024-08-22', '2024-08-22', '2024-08-22', '2024-08-22', '2024-08-22', '2024-08-22', '2024-08-23', '2024-08-23', '2024-08-23', '2024-08-23', '2024-08-23', '2024-08-23', '2024-08-23', '2024-08-23', '2024-08-23', '2024-08-23', '2024-08-26', '2024-08-26', '2024-08-26', '2024-08-26', '2024-08-26', '2024-08-26', '2024-08-26', '2024-08-26', '2024-08-26', '2024-08-26'], 'Day': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 'Participant': ['Client', 'Change', 'DII', 'Change', 'FII', 'Change', 'Pro', 'Change', 'TOTAL', 'Change', 'Client', 'Change', 'DII', 'Change', 'FII', 'Change', 'Pro', 'Change', 'TOTAL', 'Change', 'Client', 'Change', 'DII', 'Change', 'FII', 'Change', 'Pro', 'Change', 'TOTAL', 'Change', 'Client', 'Change', 'DII', 'Change', 'FII', 'Change', 'Pro', 'Client', 'Change', 'DII', 'Change', 'FII', 'Change', 'Pro', 'Change', 'TOTAL', 'Change', 'Client', 'Change', 'DII', 'Change', 'FII', 'Change', 'Pro', 'Change', 'TOTAL', 'Change'], 'Future Index Long': [388516, 12415, 80231, 10418, 275278, -4358, 78567, -15907, 822592, 2568, 363843, -24673, 81263, 1032, 283734, 8456, 72675, -5892, 801515, -21077, 375085, 11242, 80860, -403, 281160, -2574, 79139, 6464, 816244, 14729, 369050, -6035, 80787, -73, 283337, 2177, 82988, 372036, 2986, 80703, -84, 291135, 7798, 86145, 3157, 830019, 13857, 364715, -7321, 80516, -187, 308522, 17387, 79687, -6458, 833440, 3421], 'Future Index Short': [317484, -76, 151689, -2000, 275628, 251, 77791, 4393, 822592, 2568, 327975, 10491, 147489, -4200, 257500, -18128, 68551, -9240, 801515, -21077, 334124, 6149, 147489, 0, 263392, 5892, 71239, 2688, 816244, 14729, 331943, -2181, 147498, 9, 258468, -4924, 78253, 337614, 5671, 147498, 0, 265518, 7050, 79389, 1136, 830019, 13857, 348870, 11256, 146298, -1200, 251173, -14345, 87099, 7710, 833440, 3421], 'Net Future Index': [71032, 12491, -71458, 12418, -350, -4609, 776, -20300, 0, 0, 35868, -35164, -66226, 5232, 26234, 26584, 4124, 3348, 0, 0, 40961, 5093, -66629, -403, 17768, -8466, 7900, 3776, 0, 0, 37107, -3854, -66711, -82, 24869, 7101, 4735, 34422, -2685, -66795, -84, 25617, 748, 6756, 2021, 0, 0, 15845, -18577, -65782, 1013, 57349, 31732, -7412, -14168, 0, 0], 'Future Stock Long': [7242301, 1944172, 2078, 0, 1383243, 41313, 2045644, 91662, 10673266, 2077147, 6572811, -669490, 2078, 0, 1393095, 9852, 1908534, -137110, 9876518, -796748, 5783153, -789658, 2078, 0, 1325995, -67100, 1688492, -220042, 8799718, -1076800, 4376782, -1406371, 2078, 0, 1009143, -316852, 1509468, 5688440, 1311658, 2078, 0, 1446915, 437772, 1925545, 416077, 9062978, 2165507, 6535564, 847124, 2078, 0, 1678903, 231988, 2191095, 265550, 10407640, 1344662], 'Future Stock Short': [7339969, 1497863, 0, 0, 1308158, 240631, 2025139, 338653, 10673266, 2077147, 6860785, -479184, 0, 0, 1217154, -91004, 1798579, -226560, 9876518, -796748, 6133731, -727054, 0, 0, 1028972, -188182, 1637015, -161564, 8799718, -1076800, 4715721, -1418010, 0, 0, 716861, -312111, 1464889, 6004393, 1288672, 0, 0, 1234325, 517464, 1824260, 359371, 9062978, 2165507, 7023864, 1019471, 0, 0, 1416903, 182578, 1966873, 142613, 10407640, 1344662], 'Net Future Stock': [-97668, 446309, 2078, 0, 75085, -199318, 20505, -246991, 0, 0, -287974, -190306, 2078, 0, 175941, 100856, 109955, 89450, 0, 0, -350578, -62604, 2078, 0, 297023, 121082, 51477, -58478, 0, 0, -338939, 11639, 2078, 0, 292282, -4741, 44579, -315953, 22986, 2078, 0, 212590, -79692, 101285, 56706, 0, 0, -488300, -172347, 2078, 0, 262000, 49410, 224222, 122937, 0, 0], 'Option Index Call Long': [6496519, 348589, 352599, -2500, 1663947, -25893, 2030624, -53922, 10543689, 266274, 7297752, 801233, 352599, 0, 1810866, 146919, 2007469, -23155, 11468686, 924997, 6299637, -998115, 355099, 2500, 1772511, -38355, 1796964, -210505, 10224211, -1244475, 4642934, -1656703, 355099, 0, 1436608, -335903, 1661891, 5336193, 693259, 447870, 92771, 1817534, 380926, 1949952, 288061, 9551549, 1455017, 6880616, 1544423, 448370, 500, 2004639, 187105, 2020037, 70085, 11353662, 1802113], 'Option Index Call Short': [7149756, 371477, 0, 0, 1317735, 23736, 2076198, -128939, 10543689, 266274, 7800169, 650413, 0, 0, 1413656, 95921, 2254861, 178663, 11468686, 924997, 6927346, -872823, 0, 0, 1289901, -123755, 2006964, -247897, 10224211, -1244475, 5318498, -1608848, 0, 0, 995407, -294494, 1782627, 6172487, 853989, 0, 0, 1414598, 419191, 1964464, 181837, 9551549, 1455017, 7586580, 1414093, 0, 0, 1492532, 77934, 2274550, 310086, 11353662, 1802113], 'Net Option Index Call': [-653237, -22888, 352599, -2500, 346212, -49629, -45574, 75017, 0, 0, -502417, 150820, 352599, 0, 397210, 50998, -247392, -201818, 0, 0, -627709, -125292, 355099, 2500, 482610, 85400, -210000, 37392, 0, 0, -675564, -47855, 355099, 0, 441201, -41409, -120736, -836294, -160730, 447870, 92771, 402936, -38265, -14512, 106224, 0, 0, -705964, 130330, 448370, 500, 512107, 109171, -254513, -240001, 0, 0], 'Option Index Put Long': [2282331, 32306, 180402, 11304, 2383138, 1540, 667598, -310, 5513469, 44840, 2263041, -19290, 190174, 9772, 2396442, 13304, 678956, 11358, 5528613, 15144, 2295380, 32339, 196161, 5987, 2424031, 27589, 706816, 27860, 5622388, 93775, 2308894, 13514, 189026, -7135, 2399669, -24362, 737392, 2319652, 10758, 181491, -7535, 2426009, 26340, 747339, 9947, 5674491, 39510, 2298803, -20849, 182600, 1109, 2460692, 34683, 725509, -21830, 5667604, -6887], 'Option Index Put Short': [331727, 12974, 3097588, 12153, 1795311, -807, 288843, 20520, 5513469, 44840, 329357, -2370, 3116749, 19161, 1774784, -20527, 307723, 18880, 5528613, 15144, 338270, 8913, 3152514, 35765, 1799344, 24560, 332260, 24537, 5622388, 93775, 330532, -7738, 3160045, 7531, 1801526, 2182, 342878, 328603, -1929, 3166333, 6288, 1803896, 2370, 375659, 32781, 5674491, 39510, 325133, -3470, 3180125, 13792, 1792194, -11702, 370152, -5507, 5667604, -6887], 'Net Option Index Put': [1950604, 19332, -2917186, -849, 587827, 2347, 378755, -20830, 0, 0, 1933684, -16920, -2926575, -9389, 621658, 33831, 371233, -7522, 0, 0, 1957110, 23426, -2956353, -29778, 624687, 3029, 374556, 3323, 0, 0, 1978362, 21252, -2971019, -14666, 598143, -26544, 394514, 1991049, 12687, -2984842, -13823, 622113, 23970, 371680, -22834, 0, 0, 1973670, -17379, -2997525, -12683, 668498, 46385, 355357, -16323, 0, 0], 'Option Stock Call Long': [2430329, 88811, 346, -22, 126647, 2678, 575191, 4885, 3132513, 96352, 2397946, -32383, 330, -16, 138342, 11695, 598132, 22941, 3134750, 2237, 2393003, -4943, 330, 0, 153628, 15286, 606588, 8456, 3153549, 18799, 2441390, 48387, 372, 42, 154119, 491, 621709, 2365990, -75400, 364, -8, 154931, 812, 647726, 26017, 3169011, -48579, 2213467, -152523, 430, 66, 158155, 3224, 681584, 33858, 3053636, -115375], 'Option Stock Call Short': [1302496, 32621, 255616, 3090, 336563, 7680, 1237838, 52961, 3132513, 96352, 1306674, 4178, 259712, 4096, 330804, -5759, 1237560, -278, 3134750, 2237, 1317978, 11304, 261226, 1514, 328341, -2463, 1246004, 8444, 3153549, 18799, 1339970, 21992, 269802, 8576, 330217, 1876, 1277601, 1316809, -23161, 268727, -1075, 335622, 5405, 1247853, -29748, 3169011, -48579, 1264200, -52609, 258667, -10060, 323755, -11867, 1207014, -40839, 3053636, -115375], 'Net Option Stock Call': [1127833, 56190, -255270, -3112, -209916, -5002, -662647, -48076, 0, 0, 1091272, -36561, -259382, -4112, -192462, 17454, -639428, 23219, 0, 0, 1075025, -16247, -260896, -1514, -174713, 17749, -639416, 12, 0, 0, 1101420, 26395, -269430, -8534, -176098, -1385, -655892, 1049181, -52239, -268363, 1067, -180691, -4593, -600127, 55765, 0, 0, 949267, -99914, -258237, 10126, -165600, 15091, -525430, 74697, 0, 0], 'Option Stock Put Long': [837533, 39360, 0, 0, 163791, 2072, 738712, 10706, 1740036, 52138, 863125, 25592, 0, 0, 166258, 2467, 738474, -238, 1767857, 27821, 880836, 17711, 0, 0, 173845, 7587, 744654, 6180, 1799335, 31478, 893195, 12359, 0, 0, 181866, 8021, 755506, 887296, -5899, 0, 0, 189370, 7504, 765896, 10390, 1842562, 11995, 895224, 7928, 0, 0, 193510, 4140, 750150, -15746, 1838884, -3678], 'Option Stock Put Short': [979428, 18198, 0, 0, 240355, 9280, 520253, 24660, 1740036, 52138, 989697, 10269, 0, 0, 239594, -761, 538566, 18313, 1767857, 27821, 1004407, 14710, 0, 0, 239302, -292, 555626, 17060, 1799335, 31478, 1021177, 16770, 0, 0, 238877, -425, 570513, 1020680, -497, 0, 0, 242865, 3988, 579017, 8504, 1842562, 11995, 996610, -24070, 0, 0, 239380, -3485, 602894, 23877, 1838884, -3678], 'Net Option Stock Put': [-141895, 21162, 0, 0, -76564, -7208, 218459, -13954, 0, 0, -126572, 15323, 0, 0, -73336, 3228, 199908, -18551, 0, 0, -123571, 3001, 0, 0, -65457, 7879, 189028, -10880, 0, 0, -127982, -4411, 0, 0, -57011, 8446, 184993, -133384, -5402, 0, 0, -53495, 3516, 186879, 1886, 0, 0, -101386, 31998, 0, 0, -45870, 7625, 147256, -39623, 0, 0], 'Total Long Contracts': [19677529, 2465653, 615656, 19200, 5996044, 17352, 6136336, 37114, 32425565, 2539319, 19758518, 80989, 626444, 10788, 6188737, 192693, 6004240, -132096, 32577939, 152374, 18027094, -1731424, 634528, 8084, 6131170, -57567, 5622653, -381587, 30415445, -2162494, 15032245, -2994849, 627362, -7166, 5464742, -666428, 5368954, 16969607, 1937362, 712506, 85144, 6325894, 861152, 6122603, 753649, 30130610, 3637307, 19188389, 2218782, 713994, 1488, 6804421, 478527, 6448062, 325459, 33154866, 3024256], 'Total Short Contracts': [17420860, 1933057, 3504893, 13243, 5273750, 280771, 6226062, 312248, 32425565, 2539319, 17614657, 193797, 3523950, 19057, 5233492, -40258, 6205840, -20222, 32577939, 152374, 16055856, -1558801, 3561229, 37279, 4949252, -284240, 5849108, -356732, 30415445, -2162494, 13057841, -2998015, 3577345, 16116, 4341356, -607896, 5516761, 15180586, 2122745, 3582558, 5213, 5296824, 955468, 6070642, 553881, 30130610, 3637307, 17545257, 2364671, 3585090, 2532, 5515937, 219113, 6508582, 437940, 33154866, 3024256], 'Net Total Contracts': [2256669, 532596, -2889237, 5957, 722294, -263419, -89726, -275134, 0, 0, 2143861, -112808, -2897506, -8269, 955245, 232951, -201600, -111874, 0, 0, 1971238, -172623, -2926701, -29195, 1181918, 226673, -226455, -24855, 0, 0, 1974404, 3166, -2949983, -23282, 1123386, -58532, -147807, 1789021, -185383, -2870052, 79931, 1029070, -94316, 51961, 199768, 0, 0, 1643132, -145889, -2871096, -1044, 1288484, 259414, -60520, -112481, 0, 0], 'IdxFutDistNet_Pct': ['49.46', None, '-49.76', None, '-0.24', None, '0.54', None, None, None, '27.08', None, '-50.0', None, '19.81', None, '3.11', None, None, None, '30.74', None, '-50.0', None, '13.33', None, '5.93', None, None, None, '27.81', None, '-50.0', None, '18.64', None, '3.55', '25.77', None, '-50.0', None, '19.18', None, '5.06', None, None, None, '10.82', None, '-44.94', None, '39.18', None, '-5.06', None, None, None], 'IdxFutDistOve_Pct': ['42.91', None, '14.1', None, '33.49', None, '9.5', None, None, None, '43.16', None, '14.27', None, '33.76', None, '8.81', None, None, None, '43.44', None, '13.99', None, '33.36', None, '9.21', None, None, None, '42.94', None, '13.99', None, '33.19', None, '9.88', '42.75', None, '13.75', None, '33.53', None, '9.97', None, None, None, '42.81', None, '13.61', None, '33.58', None, '10.01', None, None, None], 'IdxFut_LongChg_Pct(I)': ['3.3', None, '14.92', None, '-1.56', None, '-16.84', None, None, None, '-6.35', None, '1.29', None, '3.07', None, '-7.5', None, None, None, '3.09', None, '-0.5', None, '-0.91', None, '8.89', None, None, None, '-1.61', None, '-0.09', None, '0.77', None, '4.86', '0.81', None, '-0.1', None, '2.75', None, '3.8', None, None, None, '-1.97', None, '-0.23', None, '5.97', None, '-7.5', None, None, None], 'IdxFutShortChg_Pct(I)': ['-0.02', None, '-1.3', None, '0.09', None, '5.99', None, None, None, '3.3', None, '-2.77', None, '-6.58', None, '-11.88', None, None, None, '1.87', None, '0.0', None, '2.29', None, '3.92', None, None, None, '-0.65', None, '0.01', None, '-1.87', None, '9.85', '1.71', None, '0.0', None, '2.73', None, '1.45', None, None, None, '3.33', None, '-0.81', None, '-5.4', None, '9.71', None, None, None], 'Idx_Fut_Long/Short(O)': ['55.03', None, '34.59', None, '49.97', None, '50.25', None, None, None, '52.59', None, '35.52', None, '52.42', None, '51.46', None, None, None, '52.89', None, '35.41', None, '51.63', None, '52.63', None, None, None, '52.65', None, '35.39', None, '52.3', None, '51.47', '52.43', None, '35.36', None, '52.3', None, '52.04', None, None, None, '51.11', None, '35.5', None, '55.12', None, '47.78', None, None, None], 'StkFut_Long/Short_Pct(O)': ['49.67', None, '100.0', None, '51.39', None, '50.25', None, None, None, '48.93', None, '100.0', None, '53.37', None, '51.48', None, None, None, '48.53', None, '100.0', None, '56.31', None, '50.77', None, None, None, '48.14', None, '100.0', None, '58.47', None, '50.75', '48.65', None, '100.0', None, '53.96', None, '51.35', None, None, None, '48.2', None, '100.0', None, '54.23', None, '52.7', None, None, None], 'IdxCall_lsr_Pct(O)': ['47.61', None, '100.0', None, '55.81', None, '49.45', None, None, None, '48.34', None, '100.0', None, '56.16', None, '47.1', None, None, None, '47.63', None, '100.0', None, '57.88', None, '47.24', None, None, None, '46.61', None, '100.0', None, '59.07', None, '48.25', '46.37', None, '100.0', None, '56.23', None, '49.81', None, None, None, '47.56', None, '100.0', None, '57.32', None, '47.04', None, None, None], 'IdxPut_lsr_Pct(O)': ['87.31', None, '5.5', None, '57.03', None, '69.8', None, None, None, '87.3', None, '5.75', None, '57.45', None, '68.81', None, None, None, '87.16', None, '5.86', None, '57.4', None, '68.02', None, None, None, '87.48', None, '5.64', None, '57.12', None, '68.26', '87.59', None, '5.42', None, '57.35', None, '66.55', None, None, None, '87.61', None, '5.43', None, '57.86', None, '66.22', None, None, None], 'StkCall_lsr_Pct(O)': ['65.11', None, '0.14', None, '27.34', None, '31.73', None, None, None, '64.73', None, '0.13', None, '29.49', None, '32.58', None, None, None, '64.48', None, '0.13', None, '31.88', None, '32.74', None, None, None, '64.56', None, '0.14', None, '31.82', None, '32.73', '64.24', None, '0.14', None, '31.58', None, '34.17', None, None, None, '63.65', None, '0.17', None, '32.82', None, '36.09', None, None, None], 'StkPut_lsr_Pct(O)': ['46.1', None, '0.0', None, '40.53', None, '58.68', None, None, None, '46.58', None, '0.0', None, '40.97', None, '57.83', None, None, None, '46.72', None, '0.0', None, '42.08', None, '57.27', None, None, None, '46.66', None, '0.0', None, '43.22', None, '56.98', '46.5', None, '0.0', None, '43.81', None, '56.95', None, None, None, '47.32', None, '0.0', None, '44.7', None, '55.44', None, None, None], 'Total_lsr_Pct': ['53.04', None, '14.94', None, '53.2', None, '49.64', None, None, None, '52.87', None, '15.09', None, '54.18', None, '49.17', None, None, None, '52.89', None, '15.12', None, '55.33', None, '49.01', None, None, None, '53.51', None, '14.92', None, '55.73', None, '49.32', '52.78', None, '16.59', None, '54.43', None, '50.21', None, None, None, '52.24', None, '16.61', None, '55.23', None, '49.77', None, None, None], 'nifty50_pct': [None, None, None, None, '0.13', None, None, None, None, None, None, None, None, None, '0.51', None, None, None, None, None, None, None, None, None, '0.29', None, None, None, None, None, None, None, None, None, '0.17', None, None, None, None, None, None, '0.05', None, None, None, None, None, None, None, None, None, '0.76', None, None, None, None, None], 'nifty50': [None, None, None, None, '24573', None, None, None, None, None, None, None, None, None, '24699', None, None, None, None, None, None, None, None, None, '24770', None, None, None, None, None, None, None, None, None, '24812', None, None, None, None, None, None, '24823', None, None, None, None, None, None, None, None, None, '25011', None, None, None, None, None], 'spx_pct': [None, None, None, None, '0.97', None, None, None, None, None, None, None, None, None, '-0.2', None, None, None, None, None, None, None, None, None, '0.42', None, None, None, None, None, None, None, None, None, '-0.9', None, None, None, None, None, None, '1.16', None, None, None, None, None, None, None, None, None, '-0.32', None, None, None, None, None], 'spx': [None, None, None, None, '5608', None, None, None, None, None, None, None, None, None, '5597', None, None, None, None, None, None, None, None, None, '5621', None, None, None, None, None, None, None, None, None, '5570', None, None, None, None, None, None, '5635', None, None, None, None, None, None, None, None, None, '5617', None, None, None, None, None], 'FiiCash_net(e7)': ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''], 'Cash_net(e7)': ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''], 'notes': ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '']}
_table_columns = [
TableColumn(field="date", title="date", width=500),
TableColumn(field="Day", title="Day", width=20),
TableColumn(field="Participant", title="Participant",width=500),
TableColumn(field="Future Index Long", title="Future Index Long",width=500),
TableColumn(field="Future Index Short", title="Future Index Short",width=500),
TableColumn(field="Net Future Index", title="Net Future Index",width=500),
TableColumn(field="Future Stock Long", title="Future Stock Long",width=500),
TableColumn(field="Future Stock Short", title="Future Stock Short",width=500),
TableColumn(field="Net Future Stock", title="Net Future Stock",width=500),
TableColumn(field="Option Index Call Long", title="Option Index Call Long",width=500),
TableColumn(field="Option Index Call Short", title="Option Index Call Short",width=500),
TableColumn(field="Net Option Index Call", title="Net Option Index Call",width=500),
TableColumn(field="Option Index Put Long", title="Option Index Put Long",width=500),
TableColumn(field="Option Index Put Short", title="Option Index Put Short",width=500),
TableColumn(field="Net Option Index Put", title="Net Option Index Put",width=500),
TableColumn(field="Option Stock Call Long", title="Option Stock Call Long",width=500),
TableColumn(field="Option Stock Call Short", title="Option Stock Call Short",width=500),
TableColumn(field="Net Option Stock Call", title="Net Option Stock Call",width=500),
TableColumn(field="Option Stock Put Long", title="Option Stock Put Long",width=500),
TableColumn(field="Option Stock Put Short", title="Option Stock Put Short",width=500),
TableColumn(field="Net Option Stock Put", title="Net Option Stock Put",width=500),
TableColumn(field="Total Long Contracts", title="Total Long Contracts",width=500),
TableColumn(field="Total Short Contracts", title="Total Short Contracts",width=500),
TableColumn(field="Net Total Contracts", title="Net Total Contracts",width=500),
TableColumn(field="IdxFutDistNet_Pct", title="IdxFutDistNet_Pct",width=500),
TableColumn(field="IdxFutDistOve_Pct", title="IdxFutDistOve_Pct",width=500),
TableColumn(field="IdxFut_LongChg_Pct(I)", title="IdxFut_LongChg_Pct(I)",width=500),
TableColumn(field="IdxFutShortChg_Pct(I)", title="IdxFutShortChg_Pct(I)",width=500),
TableColumn(field="Idx_Fut_Long/Short(O)", title="Idx_Fut_Long/Short(O)",width=500),
TableColumn(field="StkFut_Long/Short_Pct(O)", title="StkFut_Long/Short_Pct(O)",width=500),
TableColumn(field="IdxCall_lsr_Pct(O)", title="IdxCall_lsr_Pct(O)",width=500),
TableColumn(field="IdxPut_lsr_Pct(O)", title="IdxPut_lsr_Pct(O)",width=500),
TableColumn(field="StkCall_lsr_Pct(O)", title="StkCall_lsr_Pct(O)",width=500),
TableColumn(field="StkPut_lsr_Pct(O)", title="StkPut_lsr_Pct(O)",width=500),
TableColumn(field="Total_lsr_Pct", title="Total_lsr_Pct",width=500),
TableColumn(field="nifty50_pct", title="nifty50_pct",width=500),
TableColumn(field="nifty50", title="nifty50",width=500),
TableColumn(field="spx_pct", title="spx_pct",width=500),
TableColumn(field="spx", title="spx",width=500),
TableColumn(field="FiiCash_net(e7)", title="FiiCash_net(e7)",width=500),
TableColumn(field="Cash_net(e7)", title="Cash_net(e7)",width=500),
TableColumn(field="notes", title="notes",width=500),
]
src = ColumnDataSource(data_dict)
data_table = DataTable(source=src, columns=_table_columns, width=1700, height=850, frozen_columns=4) #1.ColumnWidth shrinks with shortened Tablewidth
# data_table = DataTable(source=src, columns=_table_columns, width=3200, height=850, frozen_columns=4) #2.Actual ColumnWidth with widened Tablewidth
title = Div(text=f'''<h1>ColumnWidth shrinks with shortened Tablewidth </h1>''', width_policy = 'auto', height=30,margin = 25)
layout = column(title, data_table)
show(layout)
datadicttable_func()